ClojureDocs

导航

命名空间

IEEE 余数

clojure.math

1.11 版本起提供
  • (IEEE-remainder 被除数 除数)
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-