Apache OpenOffice (AOO) Bugzilla – Full Text Issue Listing |
Summary: | Range of values for variables of type Double and Single are wrong | ||
---|---|---|---|
Product: | documentation | Reporter: | salva_sbs <admin> |
Component: | Manuals | Assignee: | AOO issues mailing list <issues> |
Status: | UNCONFIRMED --- | QA Contact: | |
Severity: | Normal | ||
Priority: | P3 | CC: | admin, orcmid |
Version: | AOO 3.4.1 | ||
Target Milestone: | --- | ||
Hardware: | All | ||
OS: | All | ||
Issue Type: | DEFECT | Latest Confirmation in: | --- |
Developer Difficulty: | --- |
Description
salva_sbs
2012-11-03 17:24:33 UTC
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. Of course, floating point numbers cannot represent *any* number in the range, due to its finite precision. But we don't need to be pedantic about this. For the intended audience of this documentation is is sufficient to give the lower and upper bounds. We don't need to explain numeric underflow. I think Dennis's wording is good. exact = correct = pedantic? Right. 'm pedantic ;) |