IEEE-remainder
functionv1.11
cljs.math/IEEE-remainder
(IEEE-remainder [dividend divisor])Returns the remainder per IEEE 754 such that
remainder = dividend - divisor * n
where n is the integer closest to the exact value of dividend / divisor.
If two integers are equally close, then n is the even one.
If the remainder is zero, sign will match dividend.
If dividend or divisor is ##NaN, or dividend is ##Inf or ##-Inf, or divisor is zero => ##NaN
If dividend is finite and divisor is infinite => dividend
Method: based on fmod return x-[x/p]chopped*p exactlp.
Ported from: https://github.com/openjdk/jdk/blob/master/src/java.base/share/native/libfdlibm/e_remainder.c
See: https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#IEEEremainder-double-double-
Examples
No examples yet. Be the first to add one!