Fixes the Math.ulp method

This commit is contained in:
Alexey Andreev 2014-05-11 15:45:35 +04:00
parent 45d0f56047
commit a930e5f4dc

View File

@ -152,11 +152,11 @@ public final class TMath extends TObject {
} }
public static double ulp(double d) { public static double ulp(double d) {
return pow(1, -getExponent(d) - 52); return pow(2, getExponent(d) - 52);
} }
public static float ulp(float d) { public static float ulp(float d) {
return (float)pow(1, -getExponent(d) - 23); return (float)pow(2, getExponent(d) - 23);
} }
public static double signum(double d) { public static double signum(double d) {