Hoppa till huvudinnehåll

//ERDDAP/com.cohort.util/ScriptMath2/intExponent

intExponent

[JVM]
open fun intExponent(d: Double): Int

This returns the integer exponent of a double (-0.0175 returns -2 since -0.0175=-1.75*10^-2). It handles 0, +, and - numbers. 0 and NaN returns Integer.MAX_VALUE. WARNING: round off problems cause 100 -> 10 10^1, not 110^2!

See the similar String2.toRational()

Return

the integer exponent of the number. If !isFinite(d), this returns Integer.MAX_VALUE d=0 returns 0.

Parameters

JVM

da double value