Floating point: arithmetic | |||||||||||||||
IEEE754: | |||||||||||||||
1. Convert to scientific notation | |||||||||||||||
2. Shift radix point so exponents are the same (which way?) | |||||||||||||||
3. Add 2 mantissas (or subtract if different signs) | |||||||||||||||
4. If sum does not have a single 1 bit to the left of the radix point, shift and adjust exponent | |||||||||||||||
5. Determine sign | |||||||||||||||
6. Convert back to floating point representation | |||||||||||||||
Multiplication actually requires less adjustment: | |||||||||||||||
1. Multiply mantissas | |||||||||||||||
2. Add exponents | |||||||||||||||
3. Determine sign | |||||||||||||||
4. Re-normalize | |||||||||||||||