math
nimony/lib/std/math.nim
func almostEqual(x: T; y: T; unitsInLastPlace: int64): boolChecks if two float values are almost equal, using the machine epsilon.
unitsInLastPlaceis the max number of units in the last place difference tolerated when comparing two numbers. The larger the value, the more error is allowed. A0value means that two numbers must be exactly the same to be considered equal.The machine epsilon has to be scaled to the magnitude of the values used and multiplied by the desired precision in ULPs unless the difference is subnormal.
func log(x: T; base: T): Tfunc ^(x: T; y: 0..9223372036854775807): Tfunc cot(x: float32): float32func cot(x: float64): float64func sec(x: float32): float32func sec(x: float64): float64func csc(x: float32): float32func csc(x: float64): float64func coth(x: float32): float32func coth(x: float64): float64func sech(x: float32): float32func sech(x: float64): float64func csch(x: float32): float32func csch(x: float64): float64func arccot(x: float32): float32func arccot(x: float64): float64func arcsec(x: float32): float32func arcsec(x: float64): float64func arccsc(x: float32): float32func arccsc(x: float64): float64func arccoth(x: float32): float32func arccoth(x: float64): float64func arcsech(x: float32): float32func arcsech(x: float64): float64func arccsch(x: float32): float32func arccsch(x: float64): float64func splitDecimal(x: T): tuple[intpart: T, floatpart: T]Breaks
xinto an integer and a fractional part.Returns a tuple containing
intpartandfloatpart, representing the integer part and the fractional part, respectively.Both parts have the same sign as
x. Analogous to themodffunction in C.