-
Notifications
You must be signed in to change notification settings - Fork 11
Home
devlinzhou edited this page Sep 28, 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}$
-
My 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, https://www.wolframalpha.com/input?i=taylor+series+of++asin%28x%29+
- 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