module std/num/float64std/num/float64
import std/text/parsestd/text/parse
import std/num/int32std/num/int32
import std/num/int64std/num/int64
extern import
c file "float64-inline"
js file "float64-inline.js"
pub val pistd/num/float64/pi: float64 = 0x1.9_21FB_5444_2D18p+1literal: float64
hex64= 0x1.921fb54442d18p1
pub val flt-pistd/num/float64/flt-pi: float64 = pistd/num/float64/pi: float64
pub val flt-twopistd/num/float64/flt-twopi: float64 = 0x1.9_21FB_5444_2D18p+2literal: float64
hex64= 0x1.921fb54442d18p2
pub val flt-pi2std/num/float64/flt-pi2: float64 = 0x1.9_21FB_5444_2D18p+0literal: float64
hex64= 0x1.921fb54442d18p0
pub val flt-pi4std/num/float64/flt-pi4: float64 = 0x1.9_21FB_5444_2D18p-1literal: float64
hex64= 0x1.921fb54442d18p-1
pub val flt-pi34std/num/float64/flt-pi34: float64 =0x1.2_D97C_7F33_21D2p+1literal: float64
hex64= 0x1.2d97c7f3321d2p1
pub val flt-estd/num/float64/flt-e: float64 = 0x1.5_BF0A_8B14_5769p+1literal: float64
hex64= 0x1.5bf0a8b145769p1
pub val flt-ln2std/num/float64/flt-ln2: float64 = 0x1.6_2E42_FEFA_39EFp-1literal: float64
hex64= 0x1.62e42fefa39efp-1
pub val flt-ln10std/num/float64/flt-ln10: float64 = 0x1.2_6BB1_BBB5_5516p+1literal: float64
hex64= 0x1.26bb1bbb55516p1
pub val flt-log2estd/num/float64/flt-log2e: float64 = 0x1.7_1547_652B_82FEp+0literal: float64
hex64= 0x1.71547652b82fep0
pub val flt-log10estd/num/float64/flt-log10e: float64 = 0x1.B_CB7B_1526_E50Ep-2literal: float64
hex64= 0x1.bcb7b1526e50ep-2
pub val flt-sqrt2std/num/float64/flt-sqrt2: float64 = 0x1.6_A09E_667F_3BCDp+0literal: float64
hex64= 0x1.6a09e667f3bcdp0
pub val flt-sqrt12std/num/float64/flt-sqrt12: float64 = 0x1.6_A09E_667F_3BCDp-1literal: float64
hex64= 0x1.6a09e667f3bcdp-1
pub val flt-eulerstd/num/float64/flt-euler: float64 = 0x1.2_788C_FC6F_B619p-1literal: float64
hex64= 0x1.2788cfc6fb619p-1
pub val flt-maxstd/num/float64/flt-max: float64 = 0x1.F_FFFF_FFFF_FFFFp+1023literal: float64
hex64= 0x1.fffffffffffffp1023
pub val flt-minstd/num/float64/flt-min: float64 = 0x1.0p-1022literal: float64
hex64= 0x1p-1022
pub val flt-true-minstd/num/float64/flt-true-min: float64= 0x1.0p-1074literal: float64
hex64= 0x1p-1074
pub val flt-epsilonstd/num/float64/flt-epsilon: float64 = 0x1.0p-52literal: float64
hex64= 0x1p-52
pub val flt-max-precstd/num/float64/flt-max-prec: int= 15literal: int
dec = 15
hex8 = 0x0F
bit8 = 0b00001111
pub val nanstd/num/float64/nan: float64 : float64std/core/types/float64: V = make-nanstd/num/float64/make-nan: () -> float64()
pub val posinfstd/num/float64/posinf: float64 : float64std/core/types/float64: V = make-posinfstd/num/float64/make-posinf: () -> float64()
pub val neginfstd/num/float64/neginf: float64 : float64std/core/types/float64: V = make-neginfstd/num/float64/make-neginf: () -> float64()
pub inline fip extern (==)std/num/float64/(==): (x : float64, y : float64) -> bool(x : float64std/core/types/float64: V, y : float64std/core/types/float64: V) : boolstd/core/types/bool: V
inline "(#1 == #2)"
js inline "(#1 === #2)"
pub inline fip extern (!=)std/num/float64/(!=): (x : float64, y : float64) -> bool(x : float64std/core/types/float64: V, y : float64std/core/types/float64: V) : boolstd/core/types/bool: V
inline "(#1 != #2)"
js inline "(#1 !== #2)"
pub inline fip extern (<=)std/num/float64/(<=): (x : float64, y : float64) -> bool( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V) : boolstd/core/types/bool: V
inline "(#1 <= #2)"
pub inline fip extern (>=)std/num/float64/(>=): (x : float64, y : float64) -> bool( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V) : boolstd/core/types/bool: V
inline "(#1 >= #2)"
pub inline fip extern (<)std/num/float64/(<): (x : float64, y : float64) -> bool( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V) : boolstd/core/types/bool: V
inline "(#1 < #2)"
pub inline fip extern (>)std/num/float64/(>): (x : float64, y : float64) -> bool( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V) : boolstd/core/types/bool: V
inline "(#1 > #2)"
pub inline fip extern (+)std/num/float64/(+): (x : float64, y : float64) -> float64( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V) : float64std/core/types/float64: V
inline "(#1 + #2)"
pub inline fip extern (-)std/num/float64/(-): (x : float64, y : float64) -> float64( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V) : float64std/core/types/float64: V
inline "(#1 - #2)"
pub inline fip extern (*)std/num/float64/(*): (x : float64, y : float64) -> float64( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V) : float64std/core/types/float64: V
inline "(#1 * #2)"
pub inline fip extern (/)std/num/float64/(/): (x : float64, y : float64) -> float64( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V) : float64std/core/types/float64: V
inline "(#1 / #2)"
pub inline fip extern (%)std/num/float64/(%): (x : float64, y : float64) -> float64( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V) : float64std/core/types/float64: V
c inline "fmod(#1,#2)"
inline "(#1 % #2)"
pub fip fun is-negstd/num/float64/is-neg: (d : float64) -> bool( dd: float64 : float64std/core/types/float64: V )result: -> total bool : boolstd/core/types/bool: V
dd: float64 <std/num/float64/(<): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0
pub fip fun is-posstd/num/float64/is-pos: (d : float64) -> bool( dd: float64 : float64std/core/types/float64: V )result: -> total bool : boolstd/core/types/bool: V
dd: float64 >std/num/float64/(>): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0
pub fip fun is-zerostd/num/float64/is-zero: (d : float64) -> bool( dd: float64 : float64std/core/types/float64: V )result: -> total bool : boolstd/core/types/bool: V
dd: float64 ==std/num/float64/(==): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0
pub fip fun signstd/num/float64/sign: (d : float64) -> order( dd: float64 : float64std/core/types/float64: V )result: -> total order : orderstd/core/types/order: V
if dd: float64 <std/num/float64/(<): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0 then Ltstd/core/types/Lt: order elif dd: float64 >std/num/float64/(>): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0 then Gtstd/core/types/Gt: order else Eqstd/core/types/Eq: order
pub inline fip extern (~)std/num/float64/(~): (f : float64) -> float64( f : float64std/core/types/float64: V ) : float64std/core/types/float64: V
inline "(-#1)"
pub inline extern intstd/num/float64/int: (f : float64) -> int( f : float64std/core/types/float64: V ) : intstd/core/types/int: V
c "kk_integer_from_double"
cs "Primitive.IntDouble"
js "$std_core_types._int_double"
pub inline fip extern (^)std/num/float64/(^): (f : float64, p : float64) -> float64( f : float64std/core/types/float64: V, p : float64std/core/types/float64: V) : float64std/core/types/float64: V
c inline "pow(#1,#2)"
cs "Math.Pow"
js "Math.pow"
pub inline fip extern absstd/num/float64/abs: (f : float64) -> float64( f : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c inline "kk_double_abs(#1)"
cs "Math.Abs"
js "Math.abs"
pub inline fip extern float64std/num/float64/float64: (i : int) -> float64( i : intstd/core/types/int: V) : float64std/core/types/float64: V
c "kk_integer_as_double"
cs "Primitive.IntToDouble"
js "$std_core_types._int_to_double"
pub inline fip extern float32std/num/float64/float32: (i : int) -> float32( i : intstd/core/types/int: V) : float32std/core/types/float32: V
c "kk_integer_as_float"
cs "Primitive.IntToFloat"
js "$std_core_types._int_to_float"
pub fip fun int64/float64std/num/float64/int64/float64: (i : int64) -> float64( ii: int64 : int64std/core/types/int64: V )result: -> total float64 : float64std/core/types/float64: V
ii: int64.intstd/num/int64/int: (i : int64) -> int.float64std/num/float64/float64: (i : int) -> float64
pub fip fun minstd/num/float64/min: (x : float64, y : float64) -> float64( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
if xx: float64 <=std/num/float64/(<=): (x : float64, y : float64) -> bool yy: float64 then xx: float64 else yy: float64
pub fip fun maxstd/num/float64/max: (x : float64, y : float64) -> float64( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
if xx: float64 >=std/num/float64/(>=): (x : float64, y : float64) -> bool yy: float64 then xx: float64 else yy: float64
pub fun showstd/num/float64/show: (d : float64, precision : ? int) -> string( dd: float64 : float64std/core/types/float64: V, precisionprecision: ? int : intstd/core/types/int: V = -17literal: int
dec = -17
hex8 = 0xEF
bit8 = 0b11101111 )result: -> total string : stringstd/core/types/string: V
val dabsdabs: float64 = dd: float64.absstd/num/float64/abs: (f : float64) -> float64
if dabsdabs: float64 >=std/num/float64/(>=): (x : float64, y : float64) -> bool 1.0e-5literal: float64
hex64= 0x1.4f8b588e368f1p-17 &&std/core/types/(&&): (x : bool, y : bool) -> bool dabsdabs: float64 <std/num/float64/(<): (x : float64, y : float64) -> bool 1.0e+21literal: float64
hex64= 0x1.b1ae4d6e2ef5p69
then show-fixedstd/num/float64/show-fixed: (d : float64, precision : ? int) -> string(dd: float64,precisionprecision: int)
else show-expstd/num/float64/show-exp: (d : float64, precision : ? int) -> string(dd: float64,precisionprecision: int)
pub fun show-fixedstd/num/float64/show-fixed: (d : float64, precision : ? int) -> string( dd: float64 : float64std/core/types/float64: V, precisionprecision: ? int : intstd/core/types/int: V = -2literal: int
dec = -2
hex8 = 0xFE
bit8 = 0b11111110 )result: -> total string : stringstd/core/types/string: V
val dabsdabs: float64 = dd: float64.absstd/num/float64/abs: (f : float64) -> float64
if dabsdabs: float64 <std/num/float64/(<): (x : float64, y : float64) -> bool 1.0e-15literal: float64
hex64= 0x1.203af9ee75616p-50 ||std/core/types/(||): (x : bool, y : bool) -> bool dabsdabs: float64 >std/num/float64/(>): (x : float64, y : float64) -> bool 1.0e+21literal: float64
hex64= 0x1.b1ae4d6e2ef5p69
then show-expstd/num/float64/show-exp: (d : float64, precision : ? int) -> string(dd: float64,precisionprecision: int)
else show-fixedxstd/num/float64/show-fixedx: (d : float64, prec : int32) -> string(dd: float64, precisionprecision: int.int32std/num/int32/int32: (i : int) -> int32)
extern show-fixedxstd/num/float64/show-fixedx: (d : float64, prec : int32) -> string( dd: float64 : float64std/core/types/float64: V, precprec: int32 : int32std/core/types/int32: V ) : stringstd/core/types/string: V
c "kk_double_show_fixed"
cs "Primitive.DoubleShowFixed"
js "_double_show_fixed"
pub fun show-expstd/num/float64/show-exp: (d : float64, precision : ? int) -> string( dd: float64 : float64std/core/types/float64: V, precisionprecision: ? int : intstd/core/types/int: V = -17literal: int
dec = -17
hex8 = 0xEF
bit8 = 0b11101111 )result: -> total string
show-expxstd/num/float64/show-expx: (d : float64, prec : int32) -> string(dd: float64,precisionprecision: int.int32std/num/int32/int32: (i : int) -> int32)
extern show-expxstd/num/float64/show-expx: (d : float64, prec : int32) -> string( dd: float64 : float64std/core/types/float64: V, precprec: int32 : int32std/core/types/int32: V ) : stringstd/core/types/string: V
c "kk_double_show_exp"
cs "Primitive.DoubleShowExp"
js "_double_show_exp"
pub fun minimumstd/num/float64/minimum: (xs : list<float64>) -> float64( xsxs: list<float64> : liststd/core/types/list: V -> V<float64std/core/types/float64: V> )result: -> total float64 : float64std/core/types/float64: V
match xsxs: list<float64>
Nilstd/core/types/Nil: forall<a> list<a> -> 0.0literal: float64
hex64= 0x0p+0
Consstd/core/types/Cons: forall<a> (head : a, tail : list<a>) -> list<a>(xx: float64,xxxx: list<float64>) -> xxxx: list<float64>.foldlstd/core/list/foldl: (xs : list<float64>, z : float64, f : (float64, float64) -> float64) -> float64( xx: float64, minstd/num/float64/min: (x : float64, y : float64) -> float64 )
pub fun maximumstd/num/float64/maximum: (xs : list<float64>) -> float64( xsxs: list<float64> : liststd/core/types/list: V -> V<float64std/core/types/float64: V> )result: -> total float64 : float64std/core/types/float64: V
match xsxs: list<float64>
Nilstd/core/types/Nil: forall<a> list<a> -> 0.0literal: float64
hex64= 0x0p+0
Consstd/core/types/Cons: forall<a> (head : a, tail : list<a>) -> list<a>(xx: float64,xxxx: list<float64>) -> xxxx: list<float64>.foldlstd/core/list/foldl: (xs : list<float64>, z : float64, f : (float64, float64) -> float64) -> float64( xx: float64, maxstd/num/float64/max: (x : float64, y : float64) -> float64 )
extern make-nanstd/num/float64/make-nan: () -> float64() : float64std/core/types/float64: V
c inline "(double)NAN"
cs inline "double.NaN"
js inline "NaN"
extern make-posinfstd/num/float64/make-posinf: () -> float64() : float64std/core/types/float64: V
c inline "HUGE_VAL"
cs inline "double.PositiveInfinity"
js inline "Infinity"
extern make-neginfstd/num/float64/make-neginf: () -> float64() : float64std/core/types/float64: V
c inline "-HUGE_VAL"
cs inline "double.NegativeInfinity"
js inline "-Infinity"
pub inline extern is-nanstd/num/float64/is-nan: (d : float64) -> bool( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V
c inline "isnan(#1)"
cs "double.IsNaN"
js "isNaN"
pub extern is-infstd/num/float64/is-inf: (d : float64) -> bool( dd: float64 : float64std/core/types/float64: V ) : boolstd/core/types/bool: V
c inline "isinf(#1)"
cs "double.IsInfinity"
js inline "((#1) === Infinity || (#1) === -Infinity)"
pub inline extern is-posinfstd/num/float64/is-posinf: (d : float64) -> bool( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V
c inline "(isinf(#1) && !signbit(#1))"
cs "double.IsPositiveInfinity"
js inline "((#1) === Infinity)"
pub inline extern is-neginfstd/num/float64/is-neginf: (d : float64) -> bool( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V
c inline "(isinf(#1) && signbit(#1))"
cs "double.IsNegativeInfinity"
js inline "((#1) === -Infinity)"
pub inline extern is-finitestd/num/float64/is-finite: (d : float64) -> bool( d : float64std/core/types/float64: V ) : boolstd/core/types/bool: V
c inline "isfinite(#1)"
cs inline "(!double.IsNaN(#1) && !double.IsInfinity(#1))"
js "isFinite"
pub fun is-negzerostd/num/float64/is-negzero: (d : float64) -> bool( dd: float64 : float64std/core/types/float64: V )result: -> total bool : boolstd/core/types/bool: V
(dd: float64==std/num/float64/(==): (x : float64, y : float64) -> bool0.0literal: float64
hex64= 0x0p+0 &&std/core/types/(&&): (x : bool, y : bool) -> bool is-neginfstd/num/float64/is-neginf: (d : float64) -> bool(1.0literal: float64
hex64= 0x1p0 /std/num/float64/(/): (x : float64, y : float64) -> float64 dd: float64))
pub fun is-subnormalstd/num/float64/is-subnormal: (d : float64) -> bool( dd: float64 :float64std/core/types/float64: V )result: -> total bool : boolstd/core/types/bool: V
(dd: float64 !=std/num/float64/(!=): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0 &&std/core/types/(&&): (x : bool, y : bool) -> bool dd: float64.absstd/num/float64/abs: (f : float64) -> float64 <std/num/float64/(<): (x : float64, y : float64) -> bool flt-minstd/num/float64/flt-min: float64)
pub inline extern roundstd/num/float64/round: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "kk_double_round_even"
cs inline "Math.Round(#1,MidpointRounding.ToEven)"
js "$std_core_types._double_round_even"
pub inline extern floorstd/num/float64/floor: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "floor"
cs "Math.Floor"
js "Math.floor"
pub inline extern ceilingstd/num/float64/ceiling: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "ceil"
cs "Math.Ceiling"
js "Math.ceil"
pub extern fmaddstd/num/float64/fmadd: (x : float64, y : float64, z : float64) -> float64( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V, zz: float64 : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "fma"
js "_fmadd"
cs "Math.FusedMultiplyAdd"
pub fun truncatestd/num/float64/truncate: (d : float64) -> float64(dd: float64 : float64std/core/types/float64: V)result: -> total float64 : float64std/core/types/float64: V
if dd: float64 >=std/num/float64/(>=): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0 then floorstd/num/float64/floor: (d : float64) -> float64(dd: float64) else ceilingstd/num/float64/ceiling: (d : float64) -> float64(dd: float64)
pub fun fractionstd/num/float64/fraction: (d : float64) -> float64(dd: float64 : float64std/core/types/float64: V)result: -> total float64 : float64std/core/types/float64: V
dd: float64 -std/num/float64/(-): (x : float64, y : float64) -> float64 dd: float64.truncatestd/num/float64/truncate: (d : float64) -> float64
pub fun ffractionstd/num/float64/ffraction: (d : float64) -> float64(dd: float64 : float64std/core/types/float64: V)result: -> total float64 : float64std/core/types/float64: V
dd: float64 -std/num/float64/(-): (x : float64, y : float64) -> float64 dd: float64.floorstd/num/float64/floor: (d : float64) -> float64
pub fun round-to-precstd/num/float64/round-to-prec: (d : float64, prec : int) -> float64( dd: float64 : float64std/core/types/float64: V, precprec: int : intstd/core/types/int: V )result: -> total float64 : float64std/core/types/float64: V
if precprec: int <=std/core/int/(<=): (x : int, y : int) -> bool 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000 then dd: float64.roundstd/num/float64/round: (d : float64) -> float64 else
val pp: float64 = exp10std/num/float64/exp10: (p : float64) -> float64(precprec: int.float64std/num/float64/float64: (i : int) -> float64)
(dd: float64 *std/num/float64/(*): (x : float64, y : float64) -> float64 pp: float64).roundstd/num/float64/round: (d : float64) -> float64 /std/num/float64/(/): (x : float64, y : float64) -> float64 pp: float64
pub extern float64/float32std/num/float64/float64/float32: (f : float64) -> float32( ff: float64 : float64std/core/types/float64: V ) : float32std/core/types/float32: V
c inline "(float)(#1)"
js "$std_core_types._double_to_float"
pub extern float32/float64std/num/float64/float32/float64: (f : float32) -> float64( ff: float32 : float32std/core/types/float32: V ) : float64std/core/types/float64: V
c inline "(double)(#1)"
js inline "(#1)"
pub fun f32std/num/float64/f32: (f : float64) -> float32( ff: float64 : float64std/core/types/float64: V )result: -> total float32 : float32std/core/types/float32: V
ff: float64.float32std/num/float64/float64/float32: (f : float64) -> float32
pub inline extern sqrtstd/num/float64/sqrt: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "sqrt"
cs "Math.Sqrt"
js "Math.sqrt"
pub inline extern cbrtstd/num/float64/cbrt: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "cbrt"
cs "Math.Cbrt"
js "Math.cbrt"
pub inline extern powstd/num/float64/pow: (d : float64, p : float64) -> float64( d : float64std/core/types/float64: V, p : float64std/core/types/float64: V) : float64std/core/types/float64: V
c "pow"
cs "Math.Pow"
js "Math.pow"
pub inline extern lnstd/num/float64/ln: (f : float64) -> float64( f : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "log"
cs "Math.Log"
js "Math.log"
pub inline extern log10std/num/float64/log10: (f : float64) -> float64( f : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "log10"
cs "Math.Log10"
js "Math.log10"
pub inline extern log2std/num/float64/log2: (f : float64) -> float64( f : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "log2"
cs "Math.Log2"
js "Math.log2"
pub fun logstd/num/float64/log: (f : float64, base : float64) -> float64( ff: float64 : float64std/core/types/float64: V, basebase: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
lnstd/num/float64/ln: (f : float64) -> float64(ff: float64) /std/num/float64/(/): (x : float64, y : float64) -> float64 lnstd/num/float64/ln: (f : float64) -> float64(basebase: float64)
pub inline extern expstd/num/float64/exp: (p : float64) -> float64( p : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "exp"
cs "Math.Exp"
js "Math.exp"
pub inline extern exp10std/num/float64/exp10: (p : float64) -> float64( p : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c inline "pow(10.0,#1)"
cs inline "Math.Pow(10.0,#1)"
js inline "Math.pow(10.0,#1)"
pub inline extern exp2std/num/float64/exp2: (p : float64) -> float64( p : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "exp2"
cs inline "Math.Pow(2.0,#1)"
js inline "Math.pow(2.0,#1)"
fun log2p1std/num/float64/log2p1: (x : float64) -> float64( xx: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
flt-log2estd/num/float64/flt-log2e: float64 *std/num/float64/(*): (x : float64, y : float64) -> float64 ln1pstd/num/float64/ln1p: (d : float64) -> float64(xx: float64)
fun exp2m1std/num/float64/exp2m1: (x : float64) -> float64( xx: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
expm1std/num/float64/expm1: (d : float64) -> float64(flt-ln2std/num/float64/flt-ln2: float64 *std/num/float64/(*): (x : float64, y : float64) -> float64 xx: float64)
pub fun lnaddexpstd/num/float64/lnaddexp: (x : float64, y : float64) -> float64( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
if xx: float64==std/num/float64/(==): (x : float64, y : float64) -> boolyy: float64 then xx: float64 +std/num/float64/(+): (x : float64, y : float64) -> float64 flt-ln2std/num/float64/flt-ln2: float64 else
val zz: float64 = xx: float64 -std/num/float64/(-): (x : float64, y : float64) -> float64 yy: float64
if zz: float64 >std/num/float64/(>): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0 then xx: float64 +std/num/float64/(+): (x : float64, y : float64) -> float64 ln1pstd/num/float64/ln1p: (d : float64) -> float64(expstd/num/float64/exp: (p : float64) -> float64(~std/num/float64/(~): (f : float64) -> float64zz: float64))
else yy: float64 +std/num/float64/(+): (x : float64, y : float64) -> float64 ln1pstd/num/float64/ln1p: (d : float64) -> float64(expstd/num/float64/exp: (p : float64) -> float64(zz: float64))
pub fun logaddexp2std/num/float64/logaddexp2: (x : float64, y : float64) -> float64( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
if xx: float64==std/num/float64/(==): (x : float64, y : float64) -> boolyy: float64 then xx: float64 +std/num/float64/(+): (x : float64, y : float64) -> float64 1.0literal: float64
hex64= 0x1p0 else
val zz: float64 = xx: float64 -std/num/float64/(-): (x : float64, y : float64) -> float64 yy: float64
if zz: float64 >std/num/float64/(>): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0 then xx: float64 +std/num/float64/(+): (x : float64, y : float64) -> float64 log2p1std/num/float64/log2p1: (x : float64) -> float64(exp2std/num/float64/exp2: (p : float64) -> float64(~std/num/float64/(~): (f : float64) -> float64zz: float64))
else yy: float64 +std/num/float64/(+): (x : float64, y : float64) -> float64 log2p1std/num/float64/log2p1: (x : float64) -> float64(exp2std/num/float64/exp2: (p : float64) -> float64(zz: float64))
pub fun nearly-eqstd/num/float64/nearly-eq: (x : float64, y : float64, epsilon : ? float64) -> bool( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V, epsilonepsilon: ? float64 : float64std/core/types/float64: V = 8.0literal: float64
hex64= 0x1p3*std/num/float64/(*): (x : float64, y : float64) -> float64flt-epsilonstd/num/float64/flt-epsilon: float64 )result: -> total bool : boolstd/core/types/bool: V
if xx: float64 ==std/num/float64/(==): (x : float64, y : float64) -> bool yy: float64 returnreturn: bool Truestd/core/types/True: bool
val diffdiff: float64 = (xx: float64 -std/num/float64/(-): (x : float64, y : float64) -> float64 yy: float64).absstd/num/float64/abs: (f : float64) -> float64
if xx: float64==std/num/float64/(==): (x : float64, y : float64) -> bool0.0literal: float64
hex64= 0x0p+0 ||std/core/types/(||): (x : bool, y : bool) -> bool yy: float64==std/num/float64/(==): (x : float64, y : float64) -> bool0.0literal: float64
hex64= 0x0p+0 ||std/core/types/(||): (x : bool, y : bool) -> bool diffdiff: float64 <std/num/float64/(<): (x : float64, y : float64) -> bool flt-minstd/num/float64/flt-min: float64 then
(2.0literal: float64
hex64= 0x1p1*std/num/float64/(*): (x : float64, y : float64) -> float64diffdiff: float64 <std/num/float64/(<): (x : float64, y : float64) -> bool (epsilonepsilon: float64 *std/num/float64/(*): (x : float64, y : float64) -> float64 flt-minstd/num/float64/flt-min: float64))
else
val sumsum: float64 = xx: float64.absstd/num/float64/abs: (f : float64) -> float64 +std/num/float64/(+): (x : float64, y : float64) -> float64 yy: float64.absstd/num/float64/abs: (f : float64) -> float64
((2.0literal: float64
hex64= 0x1p1*std/num/float64/(*): (x : float64, y : float64) -> float64diffdiff: float64 /std/num/float64/(/): (x : float64, y : float64) -> float64 (if sumsum: float64 >std/num/float64/(>): (x : float64, y : float64) -> bool flt-maxstd/num/float64/flt-max: float64 then flt-maxstd/num/float64/flt-max: float64 else sumsum: float64)) <std/num/float64/(<): (x : float64, y : float64) -> bool epsilonepsilon: float64)
pub fun (~=)std/num/float64/(~=): (x : float64, y : float64) -> bool(xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V )result: -> total bool : boolstd/core/types/bool: V
nearly-eqstd/num/float64/nearly-eq: (x : float64, y : float64, epsilon : ? float64) -> bool(xx: float64,yy: float64)
pub extern float64-to-bitsstd/num/float64/float64-to-bits: (d : float64) -> int64( dd: float64 : float64std/core/types/float64: V ) : int64std/core/types/int64: V
c "kk_double_to_bits"
cs "Primitive.DoubleToBits"
js "_double_to_bits"
pub extern float64-from-bitsstd/num/float64/float64-from-bits: (i : int64) -> float64( ii: int64 : int64std/core/types/int64: V ) : float64std/core/types/float64: V
c "kk_double_from_bits"
cs "Primitive.DoubleFromBits"
js "_double_from_bits"
pub fun exp2istd/num/float64/exp2i: (e : int) -> float64( ee: int : intstd/core/types/int: V )result: -> total float64 : float64std/core/types/float64: V
if ee: int >=std/core/int/(>=): (x : int, y : int) -> bool -1022literal: int
dec = -1022
hex16= 0xFC02
bit16= 0b1111110000000010 &&std/core/types/(&&): (x : bool, y : bool) -> bool ee: int <=std/core/int/(<=): (x : int, y : int) -> bool 1023literal: int
dec = 1023
hex16= 0x03FF
bit16= 0b0000001111111111
then float64-from-bitsstd/num/float64/float64-from-bits: (i : int64) -> float64( (1023literal: int
dec = 1023
hex16= 0x03FF
bit16= 0b0000001111111111 +std/core/int/(+): (x : int, y : int) -> int ee: int).int64std/num/int64/int64: (i : int) -> int64.shlstd/num/int64/shl: (i : int64, shift : int) -> int64(52literal: int
dec = 52
hex8 = 0x34
bit8 = 0b00110100) )
else exp2std/num/float64/exp2: (p : float64) -> float64( ee: int.float64std/num/float64/float64: (i : int) -> float64 )
pub fun encodestd/num/float64/encode: (man : int, exp : int) -> float64( manman: int : intstd/core/types/int: V, expexp: int : intstd/core/types/int: V )result: -> total float64 : float64std/core/types/float64: V
ldexpstd/num/float64/ldexp: (x : float64, e : int) -> float64(manman: int.float64std/num/float64/float64: (i : int) -> float64,expexp: int)
val one-p1023std/num/float64/one-p1023: float64 = 0x1.0p1023literal: float64
hex64= 0x1p1023
val one-m1022std/num/float64/one-m1022: float64 = 0x1.0p-1022literal: float64
hex64= 0x1p-1022
fun mul-exp2std/num/float64/mul-exp2: (x : float64, e : int) -> float64( xx: float64 : float64std/core/types/float64: V, ee: int : intstd/core/types/int: V )result: -> total float64 : float64std/core/types/float64: V
xx: float64 *std/num/float64/(*): (x : float64, y : float64) -> float64 exp2istd/num/float64/exp2i: (e : int) -> float64(ee: int)
pub fun ldexpstd/num/float64/ldexp: (x : float64, e : int) -> float64( xx: float64 : float64std/core/types/float64: V, ee: int : intstd/core/types/int: V )result: -> total float64 : float64std/core/types/float64: V
if !std/core/types/bool/(!): (b : bool) -> boolis-finitestd/num/float64/is-finite: (d : float64) -> bool(xx: float64) then xx: float64
elif ee: int >=std/core/int/(>=): (x : int, y : int) -> bool -1022literal: int
dec = -1022
hex16= 0xFC02
bit16= 0b1111110000000010 then
if ee: int <=std/core/int/(<=): (x : int, y : int) -> bool 1023literal: int
dec = 1023
hex16= 0x03FF
bit16= 0b0000001111111111 then mul-exp2std/num/float64/mul-exp2: (x : float64, e : int) -> float64(xx: float64,ee: int) elif ee: int <=std/core/int/(<=): (x : int, y : int) -> bool 2046literal: int
dec = 2046
hex16= 0x07FE
bit16= 0b0000011111111110 then mul-exp2std/num/float64/mul-exp2: (x : float64, e : int) -> float64( xx: float64*std/num/float64/(*): (x : float64, y : float64) -> float64one-p1023std/num/float64/one-p1023: float64, ee: int -std/core/int/(-): (x : int, y : int) -> int 1023literal: int
dec = 1023
hex16= 0x03FF
bit16= 0b0000001111111111 )
elif ee: int <=std/core/int/(<=): (x : int, y : int) -> bool 3069literal: int
dec = 3069
hex16= 0x0BFD
bit16= 0b0000101111111101 then mul-exp2std/num/float64/mul-exp2: (x : float64, e : int) -> float64( xx: float64*std/num/float64/(*): (x : float64, y : float64) -> float64one-p1023std/num/float64/one-p1023: float64*std/num/float64/(*): (x : float64, y : float64) -> float64one-p1023std/num/float64/one-p1023: float64, ee: int -std/core/int/(-): (x : int, y : int) -> int 2046literal: int
dec = 2046
hex16= 0x07FE
bit16= 0b0000011111111110 )
elif xx: float64 <std/num/float64/(<): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0 then neginfstd/num/float64/neginf: float64 else posinfstd/num/float64/posinf: float64
else
if ee: int >=std/core/int/(>=): (x : int, y : int) -> bool -2044literal: int
dec = -2044
hex16= 0xF804
bit16= 0b1111100000000100 then mul-exp2std/num/float64/mul-exp2: (x : float64, e : int) -> float64(xx: float64*std/num/float64/(*): (x : float64, y : float64) -> float64one-m1022std/num/float64/one-m1022: float64, ee: int +std/core/int/(+): (x : int, y : int) -> int 1022literal: int
dec = 1022
hex16= 0x03FE
bit16= 0b0000001111111110)
elif ee: int >=std/core/int/(>=): (x : int, y : int) -> bool -3066literal: int
dec = -3066
hex16= 0xF406
bit16= 0b1111010000000110 then mul-exp2std/num/float64/mul-exp2: (x : float64, e : int) -> float64(xx: float64*std/num/float64/(*): (x : float64, y : float64) -> float64one-m1022std/num/float64/one-m1022: float64*std/num/float64/(*): (x : float64, y : float64) -> float64one-m1022std/num/float64/one-m1022: float64, ee: int +std/core/int/(+): (x : int, y : int) -> int 2044literal: int
dec = 2044
hex16= 0x07FC
bit16= 0b0000011111111100 )
elif xx: float64 <std/num/float64/(<): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0 then -0.0literal: float64
hex64= -0x0p+0 else 0.0literal: float64
hex64= 0x0p+0
pub fun decodestd/num/float64/decode: (d : float64) -> (int, int)( dd: float64 : float64std/core/types/float64: V )result: -> total (int, int) : (std/core/types/tuple2: (V, V) -> Vintstd/core/types/int: V,intstd/core/types/int: V)
if dd: float64==std/num/float64/(==): (x : float64, y : float64) -> bool0.0literal: float64
hex64= 0x0p+0 then (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000,0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)
elif dd: float64.is-subnormalstd/num/float64/is-subnormal: (d : float64) -> bool then decode-normalizedstd/num/float64/decode-normalized: (d : float64, e-adjust : ? int) -> (int, int)(dd: float64 *std/num/float64/(*): (x : float64, y : float64) -> float64 0x1.0p54literal: float64
hex64= 0x1p54, -54literal: int
dec = -54
hex8 = 0xCA
bit8 = 0b11001010)
else decode-normalizedstd/num/float64/decode-normalized: (d : float64, e-adjust : ? int) -> (int, int)(dd: float64,0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000)
fun decode-normalizedstd/num/float64/decode-normalized: (d : float64, e-adjust : ? int) -> (int, int)( dd: float64 : float64std/core/types/float64: V, e-adjuste-adjust: ? int : intstd/core/types/int: V = 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000 )result: -> total (int, int) : (std/core/types/tuple2: (V, V) -> Vintstd/core/types/int: V,intstd/core/types/int: V)
val ii: int64 = float64-to-bitsstd/num/float64/float64-to-bits: (d : float64) -> int64(dd: float64)
val expexp: int64 = andstd/num/int64/and: (int64, int64) -> int64(ii: int64.shrstd/num/int64/shr: (i : int64, shift : int) -> int64(52literal: int
dec = 52
hex8 = 0x34
bit8 = 0b00110100),0x7FFliteral: int
dec = 2047
hex16= 0x07FF
bit16= 0b0000011111111111.int64std/num/int64/int64: (i : int) -> int64) -std/num/int64/(-): (x : int64, y : int64) -> int64 1043literal: int
dec = 1043
hex16= 0x0413
bit16= 0b0000010000010011.int64std/num/int64/int64: (i : int) -> int64
val manman: int64 = andstd/num/int64/and: (int64, int64) -> int64(ii: int64,0x000F_FFFF_FFFF_FFFFliteral: int
dec = 4503599627370495
hex64= 0x000FFFFFFFFFFFFF
bit64= 0b0000000000001111111111111111111111111111111111111111111111111111.int64std/num/int64/int64: (i : int) -> int64) +std/num/int64/(+): (x : int64, y : int64) -> int64 0x0010_0000_0000_0000literal: int
dec = 4503599627370496
hex64= 0x0010000000000000
bit64= 0b0000000000010000000000000000000000000000000000000000000000000000.int64std/num/int64/int64: (i : int) -> int64
(std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b) (if ii: int64.is-negstd/num/int64/is-neg: (i : int64) -> bool then ~std/num/int64/(~): (i : int64) -> int64manman: int64 else manman: int64).intstd/num/int64/int: (i : int64) -> int, expexp: int64.intstd/num/int64/int: (i : int64) -> int -std/core/int/(-): (x : int, y : int) -> int 32literal: int
dec = 32
hex8 = 0x20
bit8 = 0b00100000 +std/core/int/(+): (x : int, y : int) -> int e-adjuste-adjust: int )std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)
pub fun frexpstd/num/float64/frexp: (x : float64) -> (float64, int)( xx: float64 : float64std/core/types/float64: V )result: -> total (float64, int) : (std/core/types/tuple2: (V, V) -> Vfloat64std/core/types/float64: V, intstd/core/types/int: V)
if !std/core/types/bool/(!): (b : bool) -> boolxx: float64.is-finitestd/num/float64/is-finite: (d : float64) -> bool ||std/core/types/(||): (x : bool, y : bool) -> bool xx: float64.is-negzerostd/num/float64/is-negzero: (d : float64) -> bool returnreturn: (float64, int) (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)xx: float64,0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)
val (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)mm: int,ee: int)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b) = xx: float64.decodestd/num/float64/decode: (d : float64) -> (int, int)
(std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)mm: int.float64std/num/float64/float64: (i : int) -> float64 *std/num/float64/(*): (x : float64, y : float64) -> float64 0x1.0p-53literal: float64
hex64= 0x1p-53, ee: int +std/core/int/(+): (x : int, y : int) -> int 53literal: int
dec = 53
hex8 = 0x35
bit8 = 0b00110101 )std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)
pub fun next-downstd/num/float64/next-down: (x : float64) -> float64( xx: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
if xx: float64.is-nanstd/num/float64/is-nan: (d : float64) -> bool ||std/core/types/(||): (x : bool, y : bool) -> bool xx: float64.is-neginfstd/num/float64/is-neginf: (d : float64) -> bool then xx: float64
elif xx: float64.is-zerostd/num/float64/is-zero: (d : float64) -> bool then ~std/num/float64/(~): (f : float64) -> float64flt-true-minstd/num/float64/flt-true-min: float64
else
val ii: int64 = float64-to-bitsstd/num/float64/float64-to-bits: (d : float64) -> int64(xx: float64)
val nextnext: int64 = if ii: int64.is-negstd/num/int64/is-neg: (i : int64) -> bool then ii: int64.incstd/num/int64/inc: (i : int64) -> int64 else ii: int64.decstd/num/int64/dec: (i : int64) -> int64
float64-from-bitsstd/num/float64/float64-from-bits: (i : int64) -> float64(nextnext: int64)
pub fun next-upstd/num/float64/next-up: (x : float64) -> float64( xx: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
if xx: float64.is-nanstd/num/float64/is-nan: (d : float64) -> bool ||std/core/types/(||): (x : bool, y : bool) -> bool xx: float64.is-posinfstd/num/float64/is-posinf: (d : float64) -> bool then xx: float64
elif xx: float64.is-zerostd/num/float64/is-zero: (d : float64) -> bool then flt-true-minstd/num/float64/flt-true-min: float64
else
val ii: int64 = float64-to-bitsstd/num/float64/float64-to-bits: (d : float64) -> int64(xx: float64)
val nextnext: int64 = if ii: int64.is-negstd/num/int64/is-neg: (i : int64) -> bool then ii: int64.decstd/num/int64/dec: (i : int64) -> int64 else ii: int64.incstd/num/int64/inc: (i : int64) -> int64
float64-from-bitsstd/num/float64/float64-from-bits: (i : int64) -> float64(nextnext: int64)
pub fun cmpstd/num/float64/cmp: (x : float64, y : float64) -> order( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V )result: -> total order : orderstd/core/types/order: V
val bxbx: int64 = float64-to-bitsstd/num/float64/float64-to-bits: (d : float64) -> int64(xx: float64)
val byby: int64 = float64-to-bitsstd/num/float64/float64-to-bits: (d : float64) -> int64(yy: float64)
val ixix: int64 = bxbx: int64.sarstd/num/int64/sar: (i : int64, shift : int) -> int64(63literal: int
dec = 63
hex8 = 0x3F
bit8 = 0b00111111).shrstd/num/int64/shr: (i : int64, shift : int) -> int64(1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001).xorstd/num/int64/xor: (int64, int64) -> int64(bxbx: int64)
val iyiy: int64 = byby: int64.sarstd/num/int64/sar: (i : int64, shift : int) -> int64(63literal: int
dec = 63
hex8 = 0x3F
bit8 = 0b00111111).shrstd/num/int64/shr: (i : int64, shift : int) -> int64(1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001).xorstd/num/int64/xor: (int64, int64) -> int64(byby: int64)
cmpstd/num/int64/cmp: (x : int64, y : int64) -> order(ixix: int64,iyiy: int64)
pub fun midpointstd/num/float64/midpoint: (x : float64, y : float64) -> float64( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
if is-subnormalstd/num/float64/is-subnormal: (d : float64) -> bool(xx: float64) ||std/core/types/(||): (x : bool, y : bool) -> bool is-subnormalstd/num/float64/is-subnormal: (d : float64) -> bool(yy: float64)
then (xx: float64 +std/num/float64/(+): (x : float64, y : float64) -> float64 yy: float64) /std/num/float64/(/): (x : float64, y : float64) -> float64 2.0literal: float64
hex64= 0x1p1
else (xx: float64 /std/num/float64/(/): (x : float64, y : float64) -> float64 2.0literal: float64
hex64= 0x1p1) +std/num/float64/(+): (x : float64, y : float64) -> float64 (yy: float64 /std/num/float64/(/): (x : float64, y : float64) -> float64 2.0literal: float64
hex64= 0x1p1)
pub fun lerpstd/num/float64/lerp: (x : float64, y : float64, t : float64) -> float64( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V, tt: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
if (xx: float64 <=std/num/float64/(<=): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0 &&std/core/types/(&&): (x : bool, y : bool) -> bool yy: float64 >=std/num/float64/(>=): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0) ||std/core/types/(||): (x : bool, y : bool) -> bool (xx: float64 >=std/num/float64/(>=): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0 &&std/core/types/(&&): (x : bool, y : bool) -> bool yy: float64 <=std/num/float64/(<=): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0) then
tt: float64*std/num/float64/(*): (x : float64, y : float64) -> float64yy: float64 +std/num/float64/(+): (x : float64, y : float64) -> float64 (1.0literal: float64
hex64= 0x1p0 -std/num/float64/(-): (x : float64, y : float64) -> float64 tt: float64)*std/num/float64/(*): (x : float64, y : float64) -> float64xx: float64
elif tt: float64 ==std/num/float64/(==): (x : float64, y : float64) -> bool 1.0literal: float64
hex64= 0x1p0 then
yy: float64
else
val zz: float64 = xx: float64 +std/num/float64/(+): (x : float64, y : float64) -> float64 tt: float64*std/num/float64/(*): (x : float64, y : float64) -> float64(yy: float64 -std/num/float64/(-): (x : float64, y : float64) -> float64 xx: float64)
if ((tt: float64 >std/num/float64/(>): (x : float64, y : float64) -> bool 1.0literal: float64
hex64= 0x1p0) ==std/core/bool/(==): (x : bool, y : bool) -> bool (yy: float64 >std/num/float64/(>): (x : float64, y : float64) -> bool xx: float64)) then maxstd/num/float64/max: (x : float64, y : float64) -> float64(yy: float64,zz: float64) else minstd/num/float64/min: (x : float64, y : float64) -> float64(yy: float64,zz: float64)
pub fun show-hexstd/num/float64/show-hex: (d : float64, width : ? int, use-capitals : ? bool, pre : ? string) -> string( dd: float64 : float64std/core/types/float64: V, widthwidth: ? int : intstd/core/types/int: V = 1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001, use-capitalsuse-capitals: ? bool : boolstd/core/types/bool: V = Truestd/core/types/True: bool, prepre: ? string : stringstd/core/types/string: V = "0x"literal: string
count= 2 )result: -> total string : stringstd/core/types/string: V
if !std/core/types/bool/(!): (b : bool) -> booldd: float64.is-finitestd/num/float64/is-finite: (d : float64) -> bool then dd: float64.showstd/num/float64/show: (d : float64, precision : ? int) -> string else
val (std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b)mm: int,ee: int)std/core/types/Tuple2: forall<a,b> (fst : a, snd : b) -> (a, b) = dd: float64.decodestd/num/float64/decode: (d : float64) -> (int, int)
val manman: string = mm: int.absstd/core/int/abs: (i : int) -> int.show-hexstd/core/show/show-hex: (i : int, width : ? int, use-capitals : ? bool, pre : ? string) -> string(1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001,use-capitalsuse-capitals: bool,""literal: string
count= 0)
val exp0exp0: int = ee: int +std/core/int/(+): (x : int, y : int) -> int 4literal: int
dec = 4
hex8 = 0x04
bit8 = 0b00000100*std/core/int/(*): (int, int) -> int(manman: string.countstd/core/string/count: (s : string) -> int -std/core/int/(-): (x : int, y : int) -> int 1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001)
val expexp: string = (if exp0exp0: int >=std/core/int/(>=): (x : int, y : int) -> bool 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000 then "+"literal: string
count= 1 else ""literal: string
count= 0) ++std/core/types/(++): (x : string, y : string) -> string exp0exp0: int.showstd/core/int/show: (i : int) -> string
val fracfrac: string = manman: string.tailstd/core/sslice/tail: (s : string) -> string.trim-rightstd/core/sslice/trim-right: (s : string, sub : string) -> string("0"literal: string
count= 1).pad-rightstd/core/string/pad-right: (s : string, width : int, fill : ? char) -> string(maxstd/core/int/max: (i : int, j : int) -> int(1literal: int
dec = 1
hex8 = 0x01
bit8 = 0b00000001,widthwidth: int),'0'literal: char
unicode= u0030)
val signsign: string = if dd: float64.is-negstd/num/float64/is-neg: (d : float64) -> bool ||std/core/types/(||): (x : bool, y : bool) -> bool dd: float64.is-negzerostd/num/float64/is-negzero: (d : float64) -> bool then "-"literal: string
count= 1 else ""literal: string
count= 0
signsign: string ++std/core/types/(++): (x : string, y : string) -> string prepre: string ++std/core/types/(++): (x : string, y : string) -> string manman: string.headstd/core/sslice/head: (s : string) -> string ++std/core/types/(++): (x : string, y : string) -> string "."literal: string
count= 1 ++std/core/types/(++): (x : string, y : string) -> string fracfrac: string ++std/core/types/(++): (x : string, y : string) -> string "p"literal: string
count= 1 ++std/core/types/(++): (x : string, y : string) -> string expexp: string
pub fun parse-float64std/num/float64/parse-float64: (s : string) -> maybe<float64>( ss: string : stringstd/core/types/string: V )result: -> total maybe<float64> : maybestd/core/types/maybe: V -> V<float64std/core/types/float64: V>
ss: string.trimstd/core/string/trim: (s : string) -> string.to-lowerstd/core/string/to-lower: (s : string) -> string.slicestd/core/sslice/slice: (s : string) -> sslice.parse-eofstd/text/parse/parse-eof: (input : sslice, p : () -> parse float64) -> parse-error<float64>(pdoublestd/num/float64/pdouble: () -> parse float64).maybestd/text/parse/maybe: (perr : parse-error<float64>) -> maybe<float64>
pub fun pdoublestd/num/float64/pdouble: () -> parse float64()result: -> parse float64 : parsestd/text/parse/parse: (E, V) -> V float64std/core/types/float64: V
val negneg: bool = signstd/text/parse/sign: () -> parse bool()
val dd: float64 = [std/core/types/Cons: forall<a> (head : a, tail : list<a>) -> list<a>{ phexdoublestd/num/float64/phexdouble: () -> parse float64() }, { pdecdoublestd/num/float64/pdecdouble: () -> parse float64() }, { pspecialstd/num/float64/pspecial: () -> parse float64() }, { 0.0literal: float64
hex64= 0x0p+0 }]std/core/types/Nil: forall<a> list<a>.choosestd/text/parse/choose: (ps : list<parser<total,float64>>) -> parse float64
if negneg: bool then ~std/num/float64/(~): (f : float64) -> parse float64dd: float64 else dd: float64
fun phexdoublestd/num/float64/phexdouble: () -> parse float64()result: -> parse float64 : parsestd/text/parse/parse: (E, V) -> V float64std/core/types/float64: V
charstd/text/parse/char: (c : char) -> parse char('0'literal: char
unicode= u0030)
one-ofstd/text/parse/one-of: (chars : string) -> parse char("xX"literal: string
count= 2)
val manman: string = hex-digitsstd/text/parse/hex-digits: () -> parse string()
val fracfrac: string = optionalstd/text/parse/optional: (default : string, p : parser<total,string>) -> parse string( ""literal: string
count= 0, { charstd/text/parse/char: (c : char) -> parse char('.'literal: char
unicode= u002E); hex-digitsstd/text/parse/hex-digits: () -> parse string() }).trim-rightstd/core/sslice/trim-right: (s : string, sub : string) -> parse string("0"literal: string
count= 1)
val expexp: int : intstd/core/types/int: V = optionalstd/text/parse/optional: (default : int, p : parser<total,int>) -> parse int( 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000, { one-ofstd/text/parse/one-of: (chars : string) -> parse char("pP"literal: string
count= 2); pintstd/text/parse/pint: () -> parse int() })
val mm: int : intstd/core/types/int: V = (manman: string ++std/core/types/(++): (x : string, y : string) -> parse string fracfrac: string).parse-intstd/core/int/parse-int: (s : string, hex : ? bool) -> parse maybe<int>(hex=Truestd/core/types/True: bool).defaultstd/core/maybe/default: (m : maybe<int>, nothing : int) -> parse int(0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000)
val ee: int : intstd/core/types/int: V = expexp: int -std/core/int/(-): (x : int, y : int) -> parse int 4literal: int
dec = 4
hex8 = 0x04
bit8 = 0b00000100*std/core/int/(*): (int, int) -> parse intfracfrac: string.countstd/core/string/count: (s : string) -> parse int
encodestd/num/float64/encode: (man : int, exp : int) -> parse float64(mm: int,ee: int)
fun pdecdoublestd/num/float64/pdecdouble: () -> parse float64()result: -> parse float64 : parsestd/text/parse/parse: (E, V) -> V float64std/core/types/float64: V
val curcur: sslice = current-inputstd/text/parse/current-input: () -> parse sslice()
val manman: string = digitsstd/text/parse/digits: () -> parse string()
val fracfrac: string = optionalstd/text/parse/optional: (default : string, p : parser<total,string>) -> parse string(""literal: string
count= 0, { charstd/text/parse/char: (c : char) -> parse char('.'literal: char
unicode= u002E); digits0std/text/parse/digits0: () -> parse string() }).trim-rightstd/core/sslice/trim-right: (s : string, sub : string) -> parse string("0"literal: string
count= 1)
val expexp: int : intstd/core/types/int: V = optionalstd/text/parse/optional: (default : int, p : parser<total,int>) -> parse int( 0literal: int
dec = 0
hex8 = 0x00
bit8 = 0b00000000, { one-ofstd/text/parse/one-of: (chars : string) -> parse char("eE"literal: string
count= 2); pintstd/text/parse/pint: () -> parse int() })
curcur: sslice.stringstd/core/sslice/string: (slice : sslice) -> parse string.prim-parse-float64std/num/float64/prim-parse-float64: (s : string) -> parse float64
fun pspecialstd/num/float64/pspecial: () -> parse float64()result: -> parse float64 : parsestd/text/parse/parse: (E, V) -> V float64std/core/types/float64: V
[std/core/types/Cons: forall<a> (head : a, tail : list<a>) -> list<a>{ pstringstd/text/parse/pstring: (s : string) -> parse string("nan"literal: string
count= 3); nanstd/num/float64/nan: float64 },
{ pstringstd/text/parse/pstring: (s : string) -> parse string("infinity"literal: string
count= 8); posinfstd/num/float64/posinf: float64 },
{ pstringstd/text/parse/pstring: (s : string) -> parse string("inf"literal: string
count= 3); posinfstd/num/float64/posinf: float64 }
]std/core/types/Nil: forall<a> list<a>.choosestd/text/parse/choose: (ps : list<parser<total,float64>>) -> parse float64
extern prim-parse-float64std/num/float64/prim-parse-float64: (s : string) -> float64( ss: string : stringstd/core/types/string: V ) : float64std/core/types/float64: V
c "kk_prim_parse_double"
cs "Primitive.DoubleParse"
js "parseFloat"
pub fun sumstd/num/float64/sum: (xs : list<float64>) -> float64( xsxs: list<float64> : liststd/core/types/list: V -> V<float64std/core/types/float64: V> )result: -> total float64 : float64std/core/types/float64: V
var totaltotal: local-var<$2994,float64> := 0.0literal: float64
hex64= 0x0p+0
var compcomp: local-var<$2994,float64> := 0.0literal: float64
hex64= 0x0p+0
xsxs: list<float64>.foreachstd/core/list/foreach: (xs : list<float64>, action : (float64) -> (local<$2994>) ()) -> (local<$2994>) () fnfn: (x : float64) -> (local<$2994>) ()(xx: float64)
val tt: float64 = totaltotal: float64 +std/num/float64/(+): (x : float64, y : float64) -> (local<$2994>) float64 xx: float64
val cc: float64 = if totaltotal: float64.absstd/num/float64/abs: (f : float64) -> (local<$2994>) float64 >=std/num/float64/(>=): (x : float64, y : float64) -> (local<$2994>) bool xx: float64.absstd/num/float64/abs: (f : float64) -> (local<$2994>) float64 then (totaltotal: float64 -std/num/float64/(-): (x : float64, y : float64) -> (local<$2994>) float64 tt: float64) +std/num/float64/(+): (x : float64, y : float64) -> (local<$2994>) float64 xx: float64 else (xx: float64 -std/num/float64/(-): (x : float64, y : float64) -> (local<$2994>) float64 tt: float64) +std/num/float64/(+): (x : float64, y : float64) -> (local<$2994>) float64 totaltotal: float64
compcomp: local-var<$2994,float64> :=std/core/types/local-set: (v : local-var<$2994,float64>, assigned : float64) -> (local<$2994>) () compcomp: float64 +std/num/float64/(+): (x : float64, y : float64) -> (local<$2994>) float64 cc: float64
totaltotal: local-var<$2994,float64> :=std/core/types/local-set: (v : local-var<$2994,float64>, assigned : float64) -> (local<$2994>) () tt: float64
totaltotal: float64 +std/num/float64/(+): (x : float64, y : float64) -> (local<$2994>) float64 compcomp: float64;
pub fun hypotstd/num/float64/hypot: (x : float64, y : float64) -> float64( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
val xxxx: float64 = absstd/num/float64/abs: (f : float64) -> float64(xx: float64)
val yyyy: float64 = absstd/num/float64/abs: (f : float64) -> float64(yy: float64)
val lolo: float64 = minstd/num/float64/min: (x : float64, y : float64) -> float64(xxxx: float64,yyyy: float64)
val hihi: float64 = maxstd/num/float64/max: (x : float64, y : float64) -> float64(xxxx: float64,yyyy: float64)
if hihi: float64==std/num/float64/(==): (x : float64, y : float64) -> bool0.0literal: float64
hex64= 0x0p+0 then 0.0literal: float64
hex64= 0x0p+0 else
val zz: float64 = lolo: float64 /std/num/float64/(/): (x : float64, y : float64) -> float64 hihi: float64
hihi: float64 *std/num/float64/(*): (x : float64, y : float64) -> float64 sqrtstd/num/float64/sqrt: (d : float64) -> float64( 1.0literal: float64
hex64= 0x1p0 +std/num/float64/(+): (x : float64, y : float64) -> float64 zz: float64*std/num/float64/(*): (x : float64, y : float64) -> float64zz: float64 )
pub fun xyz/hypotstd/num/float64/xyz/hypot: (x : float64, y : float64, z : float64) -> float64( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V, zz: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
val xxxx: float64 = absstd/num/float64/abs: (f : float64) -> float64(xx: float64)
val yyyy: float64 = absstd/num/float64/abs: (f : float64) -> float64(yy: float64)
val zzzz: float64 = absstd/num/float64/abs: (f : float64) -> float64(zz: float64)
val hihi: float64 = maxstd/num/float64/max: (x : float64, y : float64) -> float64(maxstd/num/float64/max: (x : float64, y : float64) -> float64(xxxx: float64,yyyy: float64),zzzz: float64)
if hihi: float64==std/num/float64/(==): (x : float64, y : float64) -> bool0.0literal: float64
hex64= 0x0p+0 then 0.0literal: float64
hex64= 0x0p+0 else
hihi: float64 *std/num/float64/(*): (x : float64, y : float64) -> float64 sqrtstd/num/float64/sqrt: (d : float64) -> float64( sqrstd/num/float64/sqr: (x : float64) -> float64(xxxx: float64 /std/num/float64/(/): (x : float64, y : float64) -> float64 hihi: float64) +std/num/float64/(+): (x : float64, y : float64) -> float64 sqrstd/num/float64/sqr: (x : float64) -> float64(yyyy: float64 /std/num/float64/(/): (x : float64, y : float64) -> float64 hihi: float64) +std/num/float64/(+): (x : float64, y : float64) -> float64 sqrstd/num/float64/sqr: (x : float64) -> float64(zzzz: float64 /std/num/float64/(/): (x : float64, y : float64) -> float64 hihi: float64) )
pub fun list/hypotstd/num/float64/list/hypot: (xs : list<float64>) -> float64( xsxs: list<float64> : liststd/core/types/list: V -> V<float64std/core/types/float64: V> )result: -> total float64 : float64std/core/types/float64: V
val hihi: float64 = xsxs: list<float64>.abs-maxstd/num/float64/list/abs-max: (xs : list<float64>) -> float64
if hihi: float64==std/num/float64/(==): (x : float64, y : float64) -> bool0.0literal: float64
hex64= 0x0p+0 then 0.0literal: float64
hex64= 0x0p+0 else
hihi: float64 *std/num/float64/(*): (x : float64, y : float64) -> float64 xsxs: list<float64>.mapstd/core/list/map: (xs : list<float64>, f : (float64) -> float64) -> list<float64>( fnfn: (x : float64) -> float64(xx: float64) sqrstd/num/float64/sqr: (x : float64) -> float64(xx: float64 /std/num/float64/(/): (x : float64, y : float64) -> float64 hihi: float64) ).sumstd/num/float64/sum: (xs : list<float64>) -> float64.sqrtstd/num/float64/sqrt: (d : float64) -> float64
pub fun sqrstd/num/float64/sqr: (x : float64) -> float64(xx: float64 : float64std/core/types/float64: V )result: -> total float64: float64std/core/types/float64: V
xx: float64*std/num/float64/(*): (x : float64, y : float64) -> float64xx: float64
pub fun abs-maxstd/num/float64/abs-max: (x : float64, y : float64) -> float64( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
maxstd/num/float64/max: (x : float64, y : float64) -> float64(absstd/num/float64/abs: (f : float64) -> float64(xx: float64),absstd/num/float64/abs: (f : float64) -> float64(yy: float64))
pub fun list/abs-maxstd/num/float64/list/abs-max: (xs : list<float64>) -> float64( xsxs: list<float64> : liststd/core/types/list: V -> V<float64std/core/types/float64: V> )result: -> total float64 : float64std/core/types/float64: V
xsxs: list<float64>.foldlstd/core/list/foldl: (xs : list<float64>, z : float64, f : (float64, float64) -> float64) -> float64(0.0literal: float64
hex64= 0x0p+0, fnfn: (m : float64, x : float64) -> float64(mm: float64,xx: float64) maxstd/num/float64/max: (x : float64, y : float64) -> float64(absstd/num/float64/abs: (f : float64) -> float64(xx: float64),mm: float64) )
val rad2degstd/num/float64/rad2deg: float64 : float64std/core/types/float64: V = 180.0literal: float64
hex64= 0x1.68p7/std/num/float64/(/): (x : float64, y : float64) -> float64pistd/num/float64/pi: float64
val deg2radstd/num/float64/deg2rad: float64 : float64std/core/types/float64: V = pistd/num/float64/pi: float64/std/num/float64/(/): (x : float64, y : float64) -> float64180.0literal: float64
hex64= 0x1.68p7
pub fun degstd/num/float64/deg: (rad : float64) -> float64( radrad: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
radrad: float64 *std/num/float64/(*): (x : float64, y : float64) -> float64 rad2degstd/num/float64/rad2deg: float64
pub fun radstd/num/float64/rad: (deg : float64) -> float64( degdeg: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
degdeg: float64 *std/num/float64/(*): (x : float64, y : float64) -> float64 deg2radstd/num/float64/deg2rad: float64
pub fun with-sign-ofstd/num/float64/with-sign-of: (x : float64, y : float64) -> float64( xx: float64 : float64std/core/types/float64: V, yy: float64 : float64std/core/types/float64: V )result: -> total float64 : float64std/core/types/float64: V
if yy: float64 <std/num/float64/(<): (x : float64, y : float64) -> bool 0.0literal: float64
hex64= 0x0p+0 then ~std/num/float64/(~): (f : float64) -> float64(xx: float64.absstd/num/float64/abs: (f : float64) -> float64) else xx: float64.absstd/num/float64/abs: (f : float64) -> float64
pub inline extern sinstd/num/float64/sin: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "sin"
cs "Math.Sin"
js "Math.sin"
pub inline extern cosstd/num/float64/cos: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "cos"
cs "Math.Cos"
js "Math.cos"
pub inline extern tanstd/num/float64/tan: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "tan"
cs "Math.Tan"
js "Math.tan"
pub inline extern atanstd/num/float64/atan: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "atan"
cs "Math.Atan"
js "Math.atan"
pub inline extern atan2std/num/float64/atan2: (x : float64, y : float64) -> float64( x : float64std/core/types/float64: V, y : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "atan2"
cs "Math.Atan2"
js "Math.atan2"
pub inline extern acosstd/num/float64/acos: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "acos"
cs "Math.Acos"
js "Math.acos"
pub inline extern asinstd/num/float64/asin: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "asin"
cs "Math.Asin"
js "Math.asin"
pub inline extern tanhstd/num/float64/tanh: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "tanh"
cs "Math.Tanh"
js "Math.tanh"
pub inline extern coshstd/num/float64/cosh: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "cosh"
cs "Math.Cosh"
js "Math.cosh"
pub inline extern sinhstd/num/float64/sinh: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "sinh"
cs "Math.Sinh"
js "Math.sinh"
pub inline extern ln1pstd/num/float64/ln1p: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "log1p"
js "Math.log1p"
pub inline extern expm1std/num/float64/expm1: (d : float64) -> float64( d : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "expm1"
js "Math.expm1"
pub extern atanhstd/num/float64/atanh: (d : float64) -> float64( dd: float64 : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "atanh"
js "Math.atanh"
pub extern acoshstd/num/float64/acosh: (d : float64) -> float64( dd: float64 : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "acosh"
js "Math.acosh"
pub extern asinhstd/num/float64/asinh: (d : float64) -> float64( dd: float64 : float64std/core/types/float64: V ) : float64std/core/types/float64: V
c "asinh"
js "Math.asinh"