Single Precision "Overflow" when Nearing Divide By Zero;10E-38 (38274)
This article was previously published under Q38274
SUMMARY
The code example below produces an "OVERFLOW" error at n = 38 for
QuickBasic Versions 3.00, 4.00, and 4.00b, and Basic Compiler Versions
6.00 and 6.00b for MS-DOS and OS/2. The overflow occurs as you divide
by ever larger numbers and approach the limits of the negative
exponent for single precision. The program may overflow at different
places in other versions of Basic. To work around the "Overflow"
error, use at least one double precision variable or constant in the
expression before assigning to the variable.
Modification Type: |
Minor |
Last Reviewed: |
1/8/2003 |
Keywords: |
KB38274 |
|