< prev index next >

## src/java.base/share/classes/java/lang/StrictMath.java

 ``` `````` 210 */ 211 public static strictfp double toDegrees(double angrad) { 212 // Do not delegate to Math.toDegrees(angrad) because 213 // this method has the strictfp modifier. 214 return angrad * RADIANS_TO_DEGREES; 215 } 216 217 /** 218 * Returns Euler's number e raised to the power of a 219 * {@code double} value. Special cases: 220 *
• If the argument is NaN, the result is NaN. 221 *
• If the argument is positive infinity, then the result is 222 * positive infinity. 223 *
• If the argument is negative infinity, then the result is 224 * positive zero.
225 * 226 * @param a the exponent to raise e to. 227 * @return the value e{@code a}, 228 * where e is the base of the natural logarithms. 229 */ 230 public static native double exp(double a); 231 232 /** 233 * Returns the natural logarithm (base e) of a {@code double} 234 * value. Special cases: 235 *
• If the argument is NaN or less than zero, then the result 236 * is NaN. 237 *
• If the argument is positive infinity, then the result is 238 * positive infinity. 239 *
• If the argument is positive zero or negative zero, then the 240 * result is negative infinity.
241 * 242 * @param a a value 243 * @return the value ln {@code a}, the natural logarithm of 244 * {@code a}. 245 */ 246 public static native double log(double a); 247 248 /** 249 * Returns the base 10 logarithm of a {@code double} value. 250 * Special cases: ``` ``` `````` 210 */ 211 public static strictfp double toDegrees(double angrad) { 212 // Do not delegate to Math.toDegrees(angrad) because 213 // this method has the strictfp modifier. 214 return angrad * RADIANS_TO_DEGREES; 215 } 216 217 /** 218 * Returns Euler's number e raised to the power of a 219 * {@code double} value. Special cases: 220 *
• If the argument is NaN, the result is NaN. 221 *
• If the argument is positive infinity, then the result is 222 * positive infinity. 223 *
• If the argument is negative infinity, then the result is 224 * positive zero.
225 * 226 * @param a the exponent to raise e to. 227 * @return the value e{@code a}, 228 * where e is the base of the natural logarithms. 229 */ 230 public static double exp(double a) { 231 return FdLibm.Exp.compute(a); 232 } 233 234 /** 235 * Returns the natural logarithm (base e) of a {@code double} 236 * value. Special cases: 237 *
• If the argument is NaN or less than zero, then the result 238 * is NaN. 239 *
• If the argument is positive infinity, then the result is 240 * positive infinity. 241 *
• If the argument is positive zero or negative zero, then the 242 * result is negative infinity.
243 * 244 * @param a a value 245 * @return the value ln {@code a}, the natural logarithm of 246 * {@code a}. 247 */ 248 public static native double log(double a); 249 250 /** 251 * Returns the base 10 logarithm of a {@code double} value. 252 * Special cases: ```
< prev index next >