Skip to content
This repository was archived by the owner on Jun 19, 2022. It is now read-only.

Latest commit

 

History

History
39 lines (27 loc) · 682 Bytes

MATH.md

File metadata and controls

39 lines (27 loc) · 682 Bytes

Math/arithmetic operators

Rys programming language has 6 arithmetic operators:

  • + (plus) -- Add two numbers
  • - (minus) -- Subtract two numbers
  • * (multiply) -- Multiply two numbers
  • / (divide) -- Divide two numbers
  • % (modulo) -- Return two number division remainder
  • ** (power) -- Raise one number to the power of another

Rys math is only precise up to 0th decimal place, I.e. the full part

Rys does not support floating point integers yet

Syntax for all of them is the same:

<v2> <v1> <op>

Which is (in non-stack-based languages (like python))

<v1> <op> <v2>

For example:

2 5 -

Which is

5 - 2