MCPcopy Create free account
hub / github.com/davidgiven/luje / abs

Method abs

lib/java/lang/Math.java:60–64  ·  view source on GitHub ↗

Returns the absolute value of the argument. Special cases: abs(-0.0) = +0.0 abs(+infinity) = +infinity abs(-infinity) = +infinity abs(NaN) = NaN @param d the value whose absolute value has to be computed.

(double d)

Source from the content-addressed store, hash-verified

58 * @return the absolute value of the argument.
59 */
60 public static double abs(double d) {
61 long bits = Double.doubleToLongBits(d);
62 bits &= 0x7fffffffffffffffL;
63 return Double.longBitsToDouble(bits);
64 }
65
66 /**
67 * Returns the absolute value of the argument.

Callers 2

ulpMethod · 0.95
ulpMethod · 0.95

Calls 4

doubleToLongBitsMethod · 0.95
longBitsToDoubleMethod · 0.95
floatToIntBitsMethod · 0.95
intBitsToFloatMethod · 0.95

Tested by

no test coverage detected