Class ExtraMath
java.lang.Object
dev.pfaff.log4truth.ExtraMath
A collection of math utilities.
Quick
The quick utilities have various caveats including loss of precision, and unspecified behaviour given certain inputs.
Min/Max
Which of the input values is returned from the floating-point min/max methods when at least one isNaN is unspecified.
Clamp
The clamp methods perform no sanity checks on the inputs. Min values greater than the max value will produce unspecified results.
Which of the input values is returned from the floating-point clamp methods when at least one is NaN is unspecified, except when neither the min nor the max values are NaN, in which case the value is guaranteed to be within the specified range.
If the min is 0.0 and the value is -0.0, or if the max is -0.0 and the value is 0.0, whether the returned value is 0.0 or -0.0 is unspecified.
-
Method Summary
-
Method Details
-
log10
public static int log10(int n) Fast integer log10.Returns
-1for input0and the number of base10 digits minus1otherwise. -
log10p1
public static int log10p1(int n) Fast integer log10 plus 1.Returns
0for input0and the number of base10 digits otherwise.
-