Did you know ... Search Documentation:
Pack canny_tudor -- prolog/canny/maths.pl
PublicShow source
 frem(+X:number, +Y:number, -Z:number) is det
Z is the remainder after dividing X by Y, calculated by X - N * Y where N is the nearest integral to X / Y.
 fmod(+X:number, +Y:number, -Z:number) is det
Z is the remainder after dividing X by Y, equal to X - N * Y where N is X over Y after truncating its fractional part.
 epsilon_equal(+X:number, +Y:number) is semidet
 epsilon_equal(+Epsilons:number, +X:number, +Y:number) is semidet
Succeeds only when the absolute difference between the two given numbers X and Y is less than or equal to epsilon, or some factor (Epsilons) of epsilon according to rounding limitations.
 frexp(+X:number, -Y:number, -Exp:integer) is det
Answers mantissa Y and exponent Exp for floating-point number X.
Arguments:
Y- is the floating-point mantissa falling within the interval [0.5, 1.0). Note the non-inclusive upper bound.
 ldexp(+X:number, -Y:number, +Exp:integer) is det
Loads exponent. Multiplies X by 2 to the power Exp giving Y. Mimics the C math ldexp(x, exp) function.

Uses an unusual argument order. Ordering aligns X, Y and Exp with frexp/3. Uses ** rather than ^ operator. Exp is an integer.

Arguments:
X- is some floating-point value.
Y- is X times 2 to the power Exp.
Exp- is the exponent, typically an integer.

Undocumented predicates

The following predicates are exported, but not or incorrectly documented.

 epsilon_equal(Arg1, Arg2, Arg3)