![]() |
VOOZH | about |
public static double signum(double num)Parameters : The method accepts a single parameter num of double type representing the parameter whose signum is to be returned. Return Value : The method returns signum function of the argument num. It also gives rise to two different results:
Input: num = 72.88d Output: 1.0 Input: num = -72.88d Output: -1.0 Input: num = 0.0d Output: 0.0Below program illustrates the working of java.lang.StrictMath.signum(double) method.
Signum Value = 1.0 Signum Value = 0.0 Signum Value = -0.0 Signum Value = -1.0
public static float signum(float num)Parameters : The method accepts a single parameter num of float type representing the parameter whose signum is to be returned. Return Value : The method returns signum function of the argument num. It also gives rise to two different results:
Input: num = 11.8f Output: 1.0 Input: num = -55.88f Output: -1.0 Input: num = 0.0f Output: 0.0Below program illustrates the working of java.lang.StrictMath.signum(float) method:
Signum Value = 1.0 Signum Value = 0.0 Signum Value = -0.0 Signum Value = -1.0