Next | Making Programs Faster | 123 |
First, what about this?
as we increase the number of iterations, each individual iteration gets slower and slower.
Suppose you have two numbers of 8 decimal places each
Say 0.12345678 and 0.23456789
What happens when you multiply them?
You get 0.0289589963907942, which has 16 digits
If you multiply two 16-digit numbers, you get a 32-digit result
Math::BigFloat never throws away any trailing digits
The numbers get longer and longer every time you do a multiplication
Next | Copyright © 2003 M. J. Dominus |