Floating Point Addition - hardware/software

Join the discussion
Ask a follow-up here, or get your own question answered by working scientists, mathematicians and engineers — people, not an autocomplete.
Real named experts · corrections over time · the nuance an AI answer skips
2 replies · 2K views
coolul007
Gold Member
Messages
271
Reaction score
8
Can someone explain to me how floating point addition is implemented on a x86 in hardware or software. I would like to find out what method is used to add varying number size. if I have a 1 X 10^-100 + 2 X 10^50. are the exponents average for a common ground or does the large one rule etc. or is it something else?
 
Physics news on Phys.org
The fractional (mantissa) part of the number with the lower exponent is shifted to the right before addition is performed. This results in truncation error.
 
rcgldr said:
The fractional (mantissa) part of the number with the lower exponent is shifted to the right before addition is performed. This results in truncation error.

Thanx, for the answer, this came up in a question in the math section "is it better to add an array of numbers from smaller to larger or larger to smaller". Everyone answered small to large, which got to me to thinking about what really goes on...Therefore the larger exponent rules.