export { /* Platform Specific Types */ type machine.Float16 = IEEE-754.half ~ ; type machine.Float32 = IEEE-754.single ~ ; type machine.Float64 = IEEE-754.double ~ ; overload + = λ{ a:ℝ ~ machine.Float16 ; b:ℝ ~ machine.Float16 ; } -> ℝ ~ machine.Float16 ↦ { machine.Float16.add a b; }; overload * = λ{ a:ℝ ~ machine.Float16 ; b:ℝ ~ machine.Float16 ; } -> ℝ ~ machine.Float16 ↦ { machine.Float16.mul a b; }; let Sign = enum { Positive; Negative; }; let Sign.Positive : = 0; let Sign.Negative : = 1; let softfloat16-mul = λ{ { a.sign: Sign ~ ; a.exponent: ℤ_[-14,15] ~ ~ ℤ_32 ~ ~ ~Bit > ~ ; a.significand: ℤ_2048 ~ ~ ~ Bit> ~ ; } : ℝ ~ IEEE-754.Half ~ ; { b.sign: ; } : ℝ ~ IEEE-754.Half ~ ; } -> result: ℝ ~ IEEE~754.Half ~ ↦ { /* 1. unify */ /* 2. add exponent */ + a.exponent b.exponent; /* 3. normaize */ result.sign = bit-xor a.sign b.sign ; } }