std/num/float64▲toc

64-bit IEEE floating point numbers.

Also described as double precision or binary64 numbers in the standards. See also https://​en.​wikipedia.​org/​wiki/​Double-​precision_​floating-​point_​format.

fun float32/float64( f : float32std/core/types/float32: V ) : float64std/core/types/float64: V

Extend a float32std/core/types/float32: V to a float64std/core/types/float64: V.

fun float64/float32( f : float64std/core/types/float64: V ) : float32std/core/types/float32: V

Round a float64std/core/types/float64: V to a float32std/core/types/float32: V.

fun int64/float64( i : int64std/core/types/int64: V ) : float64std/core/types/float64: V

Convert an 64-bit integer to a float64std/core/types/float64: V.

fun list/abs-max( xs : liststd/core/types/list: V -> V<float64std/core/types/float64: V> ) : float64std/core/types/float64: V

The maximum of a list of absolute values.

fun list/hypot( xs : liststd/core/types/list: V -> V<float64std/core/types/float64: V> ) : float64std/core/types/float64: V

The square root of the sum of squares of a list of floats. Prevents overflow for large numbers and uses Kahan-Babuškan-Neumaier summation for precision.

fun xyz/hypot( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V, z : float64std/core/types/float64: V ) : float64std/core/types/float64: V

The square root of the sum of the squares of three floats. Prevents overflow for large numbers.

fun (!=)( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Are two floating point number not equal?

fun (%)( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Modulus of two floating point numbers.

fun (*)( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Multiply two floating point numbers.

fun (+)( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Add two floating point numbers.

fun (-)( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Subtract two floating point numbers.

fun (/)( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Divide two floating point numbers.

fun (<)( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is the first floating point number smaller than the second?

fun (<=)( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is the first floating point number smaller or equal to the second?

fun (==)( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Are two floating point number equal?

fun (>)( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is the first floating point number greater than the second?

fun (>=)( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is the first floating point number greater or equal to the second?

fun (^)( f : float64std/core/types/float64: V, p : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Returns the value f raised to the power p .

fun (~)( f : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Negate a float64std/core/types/float64: V.

fun (~=)( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Return if two floats are nearly equal with respect to an epsilon of 8*flt-epsilonstd/num/float64/flt-epsilon: float64. See also nearly-eqstd/num/float64/nearly-eq: (x : float64, y : float64, epsilon : ? float64) -> bool which takes an explicit epsilon.

fun abs( f : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the absolute value of a float64std/core/types/float64: V f.

fun abs-max( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

The maximum of the absolute values.

fun acos( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the arc-cosine of d.

fun acosh( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

The area hyperbolic cosine of d.

fun asin( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the arc-sine of d.

fun asinh( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

The area hyperbolic sine of d.

fun atan( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the arc-tangent of d.

fun atan2( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the arc-tangent of a point (x,y).

fun atanh( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

The area hyperbolic tangent of d.

fun cbrt( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the cubic root of a value d Returns nanstd/num/float64/nan: float64 if d == nanstd/num/float64/nan: float64 or if d is negative. Returns inf if d == inf .

fun ceiling( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the smallest integer equal or larger than d.

fun cmp( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : orderstd/core/types/order: V

Compare floats using a total ordering on the float64std/core/types/float64: V. The ordering follows the totalOrder predicate as defined in IEEE 754-2008 exactly. The values are ordered in following order: negative quiet nan, negative signaling nan, neginfstd/num/float64/neginf: float64, -finite, -0.0, +0.0, finite, posinfstd/num/float64/posinf: float64, signaling nan, and quiet nan.

fun cos( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the cosine of an angle in radians d.

fun cosh( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

The hyperbolic cosine of d.

fun decode( d : float64std/core/types/float64: V ) : (intstd/core/types/int: V, intstd/core/types/int: V)

Decode a float64 d into a tuple (m,e) of a mantissa m and exponent e such that m·2e = d exactly. The mantissa m is always either 0 or in the range [252, 253). See also frexpstd/num/float64/frexp: (x : float64) -> (float64, int).

fun deg( rad : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Convert radians to degrees.

fun encode( man : intstd/core/types/int: V, exp : intstd/core/types/int: V ) : float64std/core/types/float64: V

Create a float64 d given a mantissa man and exponent expstd/num/float64/exp: (p : float64) -> float64 such that man·2expstd/num/float64/exp: (p : float64) -> float64 = d exactly (if it is representable by a float64std/core/types/float64: V). See also ldexpstd/num/float64/ldexp: (x : float64, e : int) -> float64.

fun exp( p : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return e to the power of p.

fun exp10( p : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the 10 to the power of p.

fun exp2( p : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the 2 to the power of p.

fun exp2i( e : intstd/core/types/int: V ) : float64std/core/types/float64: V

Calculate 2·e for an integer e. Uses efficient bit conversion for exponents between -1022 and 1023 and otherwise falls back to the regular exp2 function converting e to a float64.

fun expm1( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return expstd/num/float64/exp: (p : float64) -> float64(x - 1.0). Avoids rounding errors for values of x very close to 1.0.

fun f32( f : float64std/core/types/float64: V ) : float32std/core/types/float32: V

Short version of float32 for convenience, e.g. 1.337.f32std/num/float64/f32: (f : float64) -> float32. For example:

> 1.337.show-hex ++ " != " ++ 1.337.f32.float64.show-hex
"0x1.5645A1CAC0831p+0 != 0x1.5645A2p+0"
> 1.337.show-hex ++ " != " ++ 1.337.f32std/num/float64/f32: (f : float64) -> float32.float64.show-hex
"0x1.5645A1CAC0831p+0 != 0x1.5645A2p+0"

.

fun ffraction( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the ‘floored’ fraction of d, always greater or equal to zero.
d.floorstd/num/float64/floor: (d : float64) -> float64 + d.ffractionstd/num/float64/ffraction: (d : float64) -> float64 (===)std/core/sslice/(===): (slice1 : sslice, slice2 : sslice) -> bool d
(-2.4).ffractionstd/num/float64/ffraction: (d : float64) -> float64 (===)std/core/sslice/(===): (slice1 : sslice, slice2 : sslice) -> bool 0.6.

fun float32( i : intstd/core/types/int: V ) : float32std/core/types/float32: V

Convert an integer to a float32std/core/types/float32: V. May return nanstd/num/float64/nan: float64 if the integer is too large to represent as a float32std/core/types/float32: V.

fun float64( i : intstd/core/types/int: V ) : float64std/core/types/float64: V

Convert an integer to a float64std/core/types/float64: V. May return nanstd/num/float64/nan: float64 if the integer is too large to represent as a float64std/core/types/float64: V.

fun float64-from-bits( i : int64std/core/types/int64: V ) : float64std/core/types/float64: V

Low-level: create a float64std/core/types/float64: V from the given 64-bit integer.

fun float64-to-bits( d : float64std/core/types/float64: V ) : int64std/core/types/int64: V

Low-level: return the bits of a 64-bit float64std/core/types/float64: V as in int64std/core/types/int64: V.

fun floor( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the largest integer equal or less than d.

val flt-e: float64std/core/types/float64: V

The e) constant.

val flt-epsilon: float64std/core/types/float64: V

Machine epsilon: the difference between 1.0 and the next representable float64std/core/types/float64: V value.

val flt-euler: float64std/core/types/float64: V

Euler's constant.

val flt-ln10: float64std/core/types/float64: V

The natural logarithm of 10.

val flt-ln2: float64std/core/types/float64: V

The natural logarithm of 2.

val flt-log10e: float64std/core/types/float64: V

The base-10 logarithm of e.

val flt-log2e: float64std/core/types/float64: V

The base-2 logarithm of e.

val flt-max: float64std/core/types/float64: V

Maximum float64 value.

val flt-max-prec: intstd/core/types/int: V

Maximal precision in decimal digits of a float64std/core/types/float64: V.

val flt-min: float64std/core/types/float64: V

Smallest positive normalized float64 value.

val flt-pi: float64std/core/types/float64: V

π.

val flt-pi2: float64std/core/types/float64: V

π/2.

val flt-pi34: float64std/core/types/float64: V

3π/4.

val flt-pi4: float64std/core/types/float64: V

π/4.

val flt-sqrt12: float64std/core/types/float64: V

1.0 / sqrtstd/num/float64/sqrt: (d : float64) -> float64(2.0) (= sqrtstd/num/float64/sqrt: (d : float64) -> float64(0.5)).

val flt-sqrt2: float64std/core/types/float64: V

The square-root of 2.

val flt-true-min: float64std/core/types/float64: V

Smallest positive subnormal value (i.e. DBL_TRUE_MIN).

val flt-twopi: float64std/core/types/float64: V

2π.

fun fmadd( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V, z : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Fused multiply-add. Computes (x*y)+z as if to infinite precision with only the final result rounded back to a float64std/core/types/float64: V.

fun fraction( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the fractional part of a float64std/core/types/float64: V d.
d.truncate + d.fractionstd/num/float64/fraction: (d : float64) -> float64 (===)std/core/sslice/(===): (slice1 : sslice, slice2 : sslice) -> bool d
(-2.4).fractionstd/num/float64/fraction: (d : float64) -> float64 (===)std/core/sslice/(===): (slice1 : sslice, slice2 : sslice) -> bool -0.4.

fun frexp( x : float64std/core/types/float64: V ) : (float64std/core/types/float64: V, intstd/core/types/int: V)

‘Fraction/exponent’: return the normalized fraction f and exponent expstd/num/float64/exp: (p : float64) -> float64 for a number x such that x == f·2expstd/num/float64/exp: (p : float64) -> float64. The absolute value of the fraction f is always in the range [0.5, 1.0), or one of 0.0, -0.0, neginfstd/num/float64/neginf: float64, posinfstd/num/float64/posinf: float64, or nanstd/num/float64/nan: float64. See also decodestd/num/float64/decode: (d : float64) -> (int, int) which decodes to an integer mantissa.

fun hypot( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

The hypotenuse of x and y: sqrtstd/num/float64/sqrt: (d : float64) -> float64(x*x + y*y). Prevents overflow for large numbers.

fun int( f : float64std/core/types/float64: V ) : intstd/core/types/int: V

Convert a float64std/core/types/float64: V to an intstd/core/types/int: V using roundstd/num/float64/round: (d : float64) -> float64 to round to its nearest integer. (rounding to an even number on a tie) Returns 0 if the argument is not finite?.

fun is-finite( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is this a finite number (i.e. not nanstd/num/float64/nan: float64 or infinity).

fun is-inf( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is this value equal to negative or positive infinity ?

fun is-nan( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is this value equal to NaN ?

fun is-neg( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is the value negative?

fun is-neginf( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is this value equal to negative infinity ?

fun is-negzero( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is this a negative zero value?

fun is-pos( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is the value positive?

fun is-posinf( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is this value equal to positive infinity ?

fun is-subnormal( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is this a subnormal value? (i.e. 0 < d.abs < flt-minstd/num/float64/flt-min: float64).

fun is-zero( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Is the value zero?

fun ldexp( x : float64std/core/types/float64: V, e : intstd/core/types/int: V ) : float64std/core/types/float64: V

‘Load exponent’: returns x·2e for a is-finitestd/num/float64/is-finite: (d : float64) -> bool x and otherwise x itself. See also encodestd/num/float64/encode: (man : int, exp : int) -> float64 which loads an integer mantissa.

fun lerp( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V, t : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Linear interpolation, calculating x + t*(y - x) but avoids troublesome edge cases. Follows the C++20 specification. In particular, if x.is-finitestd/num/float64/is-finite: (d : float64) -> bool (&&)std/core/types/(&&): (x : bool, y : bool) -> bool y.is-finitestd/num/float64/is-finite: (d : float64) -> bool, then: - exact: lerpstd/num/float64/lerp: (x : float64, y : float64, t : float64) -> float64(x,y,0.0) == x and lerpstd/num/float64/lerp: (x : float64, y : float64, t : float64) -> float64(x,y,1.0) == y - monotonic: if x <= y and t1 <= t2, then cmp( lerpstd/num/float64/lerp: (x : float64, y : float64, t : float64) -> float64(x,y,t1), lerpstd/num/float64/lerp: (x : float64, y : float64, t : float64) -> float64(x,y,t2) ) <= Eqstd/core/types/Eq: order (and other cases) - deterministic: only lerpstd/num/float64/lerp: (x : float64, y : float64, t : float64) -> float64(x,x,flt-inf) results in nanstd/num/float64/nan: float64 - bounded: t<0.0 || t>1.0 || is-finitestd/num/float64/is-finite: (d : float64) -> bool(lerpstd/num/float64/lerp: (x : float64, y : float64, t : float64) -> float64(x,y,t)) - consistent: lerpstd/num/float64/lerp: (x : float64, y : float64, t : float64) -> float64(x,x,t) == x.

fun ln( f : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the natural logarithm (in base e) of a float64std/core/types/float64: V f.

fun ln1p( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return lnstd/num/float64/ln: (f : float64) -> float64(1.0 + x). Avoids potential imprecision for small x where adding 1.0 explicitly may lead to rounding errors.

fun lnaddexp( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Returns lnstd/num/float64/ln: (f : float64) -> float64(expstd/num/float64/exp: (p : float64) -> float64(x) + expstd/num/float64/exp: (p : float64) -> float64(y)). Avoids overlow/underflow errors.

fun log( f : float64std/core/types/float64: V, base : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the logarithm in base base of a float64std/core/types/float64: V f.

fun log10( f : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the logarithm in base 10 of a float64std/core/types/float64: V f.

fun log2( f : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the logarithm in base 2 of a float64std/core/types/float64: V f.

fun logaddexp2( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Returns log2std/num/float64/log2: (f : float64) -> float64( exp2(x) + exp2(y) ). Avoids overlow/underflow errors.

fun max( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Returns the largest of two floats.

fun maximum( xs : liststd/core/types/list: V -> V<float64std/core/types/float64: V> ) : float64std/core/types/float64: V

Returns the largest element of a list of floats (or 0 for the empty list).

fun midpoint( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

The midpoint is the average of x and y. Avoids overflow on large numbers.

fun min( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Returns the smallest of two floats.

fun minimum( xs : liststd/core/types/list: V -> V<float64std/core/types/float64: V> ) : float64std/core/types/float64: V

Returns the smallest element of a list of floats (or 0 for the empty list).

val nan: float64std/core/types/float64: V

Represents a value that is not a number (NaN).

fun nearly-eq( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V, epsilon : ? float64std/core/types/float64: V ) : boolstd/core/types/bool: V

Return if two floats are nearly equal with respect to some epsilon (=8*flt-epsilonstd/num/float64/flt-epsilon: float64). The epsilon is the nearest difference for numbers around 1.0. The routine automatically scales the epsilon for larger and smaller numbers, and for subnormal numbers.

val neginf: float64std/core/types/float64: V

Negative infinity.

fun next-down( x : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Returns the greatest float64std/core/types/float64: V less than x. This behaves exactly as nextDown in the IEEE 754-2008 standard. The identity x.next-downstd/num/float64/next-down: (x : float64) -> float64 == next-downstd/num/float64/next-down: (x : float64) -> float64(x) holds for all x. When x is finite x == x.next-downstd/num/float64/next-down: (x : float64) -> float64.next-upstd/num/float64/next-up: (x : float64) -> float64 also holds.

fun next-up( x : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Returns the least float64std/core/types/float64: V greater than x. This behaves exactly as nextUp in the IEEE 754-2008 standard. The identity x.next-upstd/num/float64/next-up: (x : float64) -> float64 == next-downstd/num/float64/next-down: (x : float64) -> float64(x) holds for all x. When x is finite x == x.next-upstd/num/float64/next-up: (x : float64) -> float64.next-downstd/num/float64/next-down: (x : float64) -> float64 also holds.

fun parse-float64( s : stringstd/core/types/string: V ) : maybestd/core/types/maybe: V -> V<float64std/core/types/float64: V>

Parse a float64 number. Can be “NaN”, “Inf(inity)” (case-insensitive), a fix-point number (1.2) or in scientific notation (-2.3e-5). Also allows floats in hexadecimal notation (0xA.Fp-10) that can be represented precisely (and are the preferred round trip format).

fun pdouble(): parsestd/text/parse/parse: (E, V) -> V float64std/core/types/float64: V
val pi: float64std/core/types/float64: V

π.

val posinf: float64std/core/types/float64: V

Positive infinity.

fun pow( d : float64std/core/types/float64: V, p : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the d raised to the power of p.

fun rad( deg : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Convert degrees to radians.

fun round( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Round a float64 to its nearest integral value. If the value is halfway between two integers, the value is rounded towards the even one.

fun round-to-prec( d : float64std/core/types/float64: V, prec : intstd/core/types/int: V ) : float64std/core/types/float64: V

Round a float64 to a specified precision. Rounds to the even number in case of a tie.
123.456.round-to-precstd/num/float64/round-to-prec: (d : float64, prec : int) -> float64(2) == 123.46
123.456.round-to-precstd/num/float64/round-to-prec: (d : float64, prec : int) -> float64(-1) == 120.0.

fun show( d : float64std/core/types/float64: V, precision : ? intstd/core/types/int: V ) : stringstd/core/types/string: V

Show a float64std/core/types/float64: V as a string. If d >= 1.0e-5 and d < 1.0e+21, show-fixedstd/num/float64/show-fixed: (d : float64, precision : ? int) -> string is used and otherwise show-expstd/num/float64/show-exp: (d : float64, precision : ? int) -> string. Default precision is -17.

fun show-exp( d : float64std/core/types/float64: V, precision : ? intstd/core/types/int: V ) : stringstd/core/types/string: V

Show a float64std/core/types/float64: V in exponential (scientific) notation. The optional precision (= -17) specifies the precision. If >=0 it specifies the number of digits behind the dot (up to 17 max). If negative, then at most the absolute value of precision digits behind the dot are used.

fun show-fixed( d : float64std/core/types/float64: V, precision : ? intstd/core/types/int: V ) : stringstd/core/types/string: V

Show a float64std/core/types/float64: V fixed-point notation. The optional precision (= -2) specifies the maximum precision. If >=0 it specifies the number of digits behind the dot (up to 20 max). If negative, then at most the absolute value of precision digits behind the dot are used. This may still show a number in exponential notation if the it is too small or large, in particular, for a d where d > 1.0e21 or d < 1.0e-15, or if precision.abs > 17, the show-expstd/num/float64/show-exp: (d : float64, precision : ? int) -> string routine is used.

fun show-hex( d : float64std/core/types/float64: V, width : ? intstd/core/types/int: V, use-capitals : ? boolstd/core/types/bool: V, pre : ? stringstd/core/types/string: V ) : stringstd/core/types/string: V

Show a float64 in hexadecimal notation. An advantage of this format is that it precisely represents the float64std/core/types/float64: V and can reliably (and efficiently) be parsed back, i.e. d.show-hex.parse-float64std/num/float64/parse-float64: (s : string) -> maybe<float64> == Juststd/core/types/Just: forall<a> (value : a) -> maybe<a>(d). The significant is the hexadecimal fraction while the exponent after the p is the decimal power of 2. For example, 0xA.Fp-10 = (10 + 15/16)·2-10 (not 2-16!) = 0.01068115234375. Equivalently, 0xA.Fp-10 == 0x5.78p-9 == 0x2.BCp-8 == 0x1.5Ep-7.

> flt-min.show-hex
"0x1.0p-1022"
> 0.1.show-hex
"0x1.999999999999Ap-4"
> flt-max.show-hex
"0x1.FFFFFFFFFFFFFp+1023"
> -0.0.show-hex
"-0x0.0p+0"
> nan.show-hex
"NaN"
> 0.01068115234375.show-hex
"0x1.5Ep-7"
> flt-minstd/num/float64/flt-min: float64.show-hex
"0x1.0p-1022"
> 0.1.show-hex
"0x1.999999999999Ap-4"
> flt-maxstd/num/float64/flt-max: float64.show-hex
"0x1.FFFFFFFFFFFFFp+1023"
> -0.0.show-hex
"-0x0.0p+0"
> nanstd/num/float64/nan: float64.show-hex
"NaN"
> 0.01068115234375.show-hex
"0x1.5Ep-7"

.

fun sign( d : float64std/core/types/float64: V ) : orderstd/core/types/order: V

Compare the argument to zero.

fun sin( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the sine of an angle in radians d.

fun sinh( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

The hyperbolic sine of d.

fun sqr( x : float64std/core/types/float64: V ) : float64std/core/types/float64: V

The square of a float64.

fun sqrt( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the square root of a value d Returns nanstd/num/float64/nan: float64 if d == nanstd/num/float64/nan: float64 or if d is negative. Returns inf if d == inf .

fun sum( xs : liststd/core/types/list: V -> V<float64std/core/types/float64: V> ) : float64std/core/types/float64: V

Return the sum of a list of floats. Uses Kahan-Babuškan-Neumaier summation to minimize rounding errors. This is more precise as Kahan summation and about as fast.
[1.0e3,1.0e97,1.0e3,-1.0e97].sum == 2000.0
while
[1.0e3,1.0e97,1.0e3,-1.0e97].foldlstd/core/list/foldl: forall<a,b,e> (xs : list<a>, z : b, f : (b, a) -> e b) -> e b(0.0,(+)) == 0.0 (!)
A. Neumaier, Rundungsfehleranalyse einiger Verfahren zur Summation endlicher Summen. Math. Mechanik, 54:39–51, 1974.

fun tan( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the tangent of an angle in radians d.

fun tanh( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

The hyperbolic tangent of d.

fun truncate( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return the integral part of a float64std/core/types/float64: V d . If d >= 0.0 , return the largest integer equal or less to d , If d < 0.0 , return the smallest integer equal or larger to d .

fun with-sign-of( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V

Return x with the sign of y.

private import std/core/typesstd/core/types, std/core/hndstd/core/hnd, std/core/exnstd/core/exn, std/core/boolstd/core/bool, std/core/orderstd/core/order, std/core/charstd/core/char, std/core/intstd/core/int, std/core/vectorstd/core/vector, std/core/stringstd/core/string, std/core/sslicestd/core/sslice, std/core/liststd/core/list, std/core/maybestd/core/maybe, std/core/eitherstd/core/either, std/core/tuplestd/core/tuple, std/core/showstd/core/show, std/core/debugstd/core/debug, std/core/delayedstd/core/delayed, std/core/consolestd/core/console, std/corestd/core, std/text/parsestd/text/parse, std/num/int32std/num/int32, std/num/int64std/num/int64