I'm working with some data files that include huge quantities of floating point numbers (GIS shapefiles, containing latitude/longitude/altitude/measurement info). The majority of the time, the numbers I'm working with are small enough for perl to handle with no problem, but occasionally (especially with measurements) I get data that gets me into trouble unless I use Math::BigFloat.
Unfortunately, due to the sheer volume of numbers being manipulated, using BigFloat for all of them has too large a performance impact (turning the run time from around 6 hours to as much as 10 days), so I'd prefer not to use BigFloat when it isn't necessary. The bright part of this is that the file headers indicate the range of numbers included in each measure, so I don't have to check the whole file, I just have to look at the header and determine if any measure has a minimum/maximum value that indicates that I should use BigFloat for that value.
The problem I'm running into is that I can't figure out how I can examine a number and determine if it's going to be big enough to require BigFloat. So can anybody suggest a method for determining "how big is big?"?
In reply to Determining when Math::BigFloat is necessary? by jasonk
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |