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

Method abs

lib/java/lang/StrictMath.java:75–79  ·  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

73 * @return the absolute value of the argument.
74 */
75 public static double abs(double d) {
76 long bits = Double.doubleToLongBits(d);
77 bits &= 0x7fffffffffffffffL;
78 return Double.longBitsToDouble(bits);
79 }
80
81 /**
82 * Returns the absolute value of the argument.

Callers

nothing calls this directly

Calls 4

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

Tested by

no test coverage detected