C.0.2. Algebraic Standard Functions - JulTob/Ada GitHub Wiki
Defined for Numeric types
Algebraic comparators
=
/=
<
<=
>
>=
Algebraic functions
Exactly what you would expect
Common to signed and floating point types
+
-
*
/
Absolute
abs
Reminder
When you divide integers, sometimes you have extra stuff that doesn't fit. That's the reminder.
5 divides 2 in 2 groups with one reminder left.
rem
5 rem 2 = 1
-11 rem 5 = -1
Modullus
The modulus operator works similar to the remainder, but on the circular range.
5 mod 2 = 1
-11 mod 5 = 4
Powers
You multiply a number so many times to itself. 2 times itself 3 times is 8
**
2 ** 3 = 8
Floating attributes
Ceiling(F)
Floor(F)
Truncation(F)
I := Rounding(F);
Remainder(F1,F2)