< prev index next >
src/java.base/share/classes/java/lang/Math.java
Print this page
*** 1975,1984 ****
--- 1975,1985 ----
* @param d the floating-point value whose signum is to be returned
* @return the signum function of the argument
* @author Joseph D. Darcy
* @since 1.5
*/
+ @HotSpotIntrinsicCandidate
public static double signum(double d) {
return (d == 0.0 || Double.isNaN(d))?d:copySign(1.0, d);
}
/**
*** 1996,2005 ****
--- 1997,2007 ----
* @param f the floating-point value whose signum is to be returned
* @return the signum function of the argument
* @author Joseph D. Darcy
* @since 1.5
*/
+ @HotSpotIntrinsicCandidate
public static float signum(float f) {
return (f == 0.0f || Float.isNaN(f))?f:copySign(1.0f, f);
}
/**
< prev index next >