-
Notifications
You must be signed in to change notification settings - Fork 10
Home
devlinzhou edited this page Oct 21, 2022
·
9 revisions
Welcome to the deterministic_float wiki!
-
IEEE-754 float
sign exponents(8 bits) fractions(23 bits) 31 30 29 ... 24 23 22 21 ... 1 0 $\mathbf{X}_{IEEE754} = (-1)^\mathbf{sign} \times (1.\mathbf{fraction}) \times 2 ^{\mathbf{exponent} - 127}$
-
GFloat
sign fractions(23 bits) exponents(8 bits) 31 30 29 ... 9 8 7 6 ... 1 0 $\mathbf{X}_{GFloat} = (-1)^\mathbf{sign} \times (\mathbf{fraction}) \times 2 ^{\mathbf{exponent} - 127}$
- Sin、Cos : Mathematica MiniMaxApproximation or use look-up table
- ASin、ACos、Atan : Taylor expansion
- InvSqrt、Sqrt : Mathematica MiniMaxApproximation + Newton's method
- Exp、Pow : convert to power of 2 to calculate
- Log、Log10 : convert to logarithm of 2 to calculate
- pow2、log2 :scanforwardbits to get exponent of the number. and use MiniMaxApproximation to caculate [0.5~1.5] value
- random input