It is with the following source that the following functions are implemented:
double nextAfter(double x, double y) - returns the double adjacent to x in the direction of y double scalb(double x, int e) - computes x*2e quickly boolean unordered(double c1, double c2) - returns true iff the two cannot be compared numerically (one or both is NaN) int fpclassify(double value) - classifies a floating-point value into one of five types: FP_NAN: "not any number", typically the result of illegal operations like 0/0 FP_INFINITY: represents one end of the real line, available by 1/0 or POSITIVE_INFINITY FP_ZERO: positive or negative zero; they are different, but not so much that it comes up much FP_SUBNORMAL: a class of numbers very near zero; further explanation would require a detailed examination of the floating-point binary representation FP_NORMAL: most values you encounter are "normal" double copySign(double value, double sign) - returns value, possibly with its sign flipped, to match "sign" double logb754(double value) - extracts the exponent of the value, to compute log2 double logb854(double value) - like logb754(value), but with an IEEE854-compliant variant for subnormal numbers double logbn(double value) - also computing log2(value), but with a normalizing correction for the subnormals; this is the best log routine double raise(double x) - not actually an IEEE754 routine, this is an optimized version of nextAfter(x,POSITIVE_INFINITY) double lower(double x) - not actually an IEEE754 routine, this is an optimized version of nextAfter(x,NEGATIVE_INFINITY)
"All of these routines also have floating point options that differ only in arguments and return types. Class is org.dosereality.util.IEEE754"
Link to Internet Error 2003
Woot4moo
source share