|  3DSoftware.com > Programming > Floating Point > Page 8 |
|
Floating Point Numbers
Page 8
Wide Floating Point Division Division is multiplication of the reciprocal. Denoting A as the dividend, and B as the divisor, we have: |
|
| A/B = A × 1/B | |
|
The reciprocal of the divisor |
|
|
|
|
The division becomes: A/B = A × u. |
|
Square Root
Square root also uses NR calculation of a quadratically converging sequence. The sequence converges to the reciprocal of the square root, which is then multiplied by the value the square root is sought for: |
|
| sqrt(A) = A × 1/sqrt(A) | |
|
The reciprocal of the square root, |
|
|
|
|
The square root becomes: sqrt( A ) = A × u. Note: Division by 2 is accomplished by right shifting the significand one bit and renormalizing if necessary. Renormalizing consists of shifting the digit packets until one non-zero digit packet is to the left of the radix point, then adjusting the exponent by the number of digit packet positions shifted. |
|
|
|
References: |
|
|
Muller, J.M., 2006,
Elementary Functions: Algorithms and Implementation
|
|
|
Parker, A., 1993,
Algorithms and Data Structures |
|
|
Press, W.H., Teukolsky, S.A., Vetterling, W.T., and Flannery, B.P., 2002,
Numerical Recipes in C++
|
|
|
Abramowitz, M., and Stegun, I.A., 1972,
Handbook of Mathematical Functions,
|
| Page 8 | ||||||
|
|
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 12:52:11 GMT |