ClojureDocs

Nav

Namespaces

IEEE-remainder

clojure.math

Available since 1.11
  • (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
See: https://docs.oracle.com/javase/8/docs/api/java/lang/Math.html#IEEEremainder-double-double-