incubator-ooo-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 121307] Range of values for variables of type Double and Single are wrong
Date Sat, 03 Nov 2012 18:04:45 GMT
https://issues.apache.org/ooo/show_bug.cgi?id=121307

orcmid <orcmid@apache.org> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |orcmid@apache.org

--- Comment #1 from orcmid <orcmid@apache.org> ---
Good catch!

Also, don't forget that 0 is representable.

The (English) comment about the reason for singles versus doubles is incorrect. 

The basic reason for the difference is in the amount of storage required where
many such values are used.  In many systems, such as the use of C Language, all
computations are in double even though variables can be either single or
double.

Because this is about the numerals represented in Basic, it is probably all
right to use floating-point scientific notation in these cases.

For example,

"Single variables carry 4-byte floating-point representations of positive and
negative magnitudes.  The values preserve approximately 7 decimal digits of
precision.  The floating-point values include 0 and approximate magnitudes in
the interval from 1.4E-45 to 3.402823E+38."  

I assume the notation itself is defined elsewhere.  I also believe that the low
end is achieved only with unnormalized (lower precision) values, so giving an
exact value there is misleading.

-- 
You are receiving this mail because:
You are the assignee for the bug.

Mime
View raw message