|  3DSoftware.com > Programming > Floating Point > Page 7 |
|
Floating Point Numbers
Page 7
Wide Floating Point Multiplication Multiplication of WideFloat numbers consists of adding the exponents and multiplying the significands. Multiplication of significands is like WideInteger multiplication, but with carrying in the opposite direction. Carrying will be from high multiplication to low multiplication. Multiplication with Truncation Multiplication of two WideFloat numbers, A and B, each having 6 digit packets, with truncation of the product is accomplished with this polynomial: |
||||
|
||||
|
The The If the The coefficients are two digit packets wide, and can be split into digit packets before or after carries are propagated. |
||||
|
Multiplication with Rounding
The same multiplication, to support rounding instead of truncation, is accomplished with this polynomial: |
||||||||||||||||||||||
|
||||||||||||||||||||||
|
Carrying is from You can do two multiplications at once with PMULUDQ. Unsigned additions of |
||||||||||||||||||||||
|
||||||||||||||||||||||
|
If a new digit is created (if t0 has a carry-out), then increment the exponent and shift the digit packets one position so that the new digit is the only digit to the left of the radix point. |
| Page 7 | ||||||
|
|
Copyright © 2008 by 3D Software. All rights reserved. 3D Software, P.O. Box 221190, Sacramento CA 95822 USA www.3DSoftware.com Contact us |
| Thursday, 20-Nov-2008 13:16:06 GMT |