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)
| 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. |
nothing calls this directly
no test coverage detected