You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@openoffice.apache.org by bu...@apache.org on 2012/11/03 18:24:33 UTC
[Bug 121307] New: Range of values for variables of type Double and
Single are wrong
https://issues.apache.org/ooo/show_bug.cgi?id=121307
Priority: P3
Bug ID: 121307
Assignee: ooo-issues@incubator.apache.org
Summary: Range of values for variables of type Double and
Single are wrong
Severity: normal
Issue Type: DEFECT
Classification: Unclassified
OS: All
Reporter: salva_sbs@openoffice.org
Hardware: All
Status: UNCONFIRMED
Version: AOO 3.4.1
Component: Manuals
Product: documentation
In the help of OOo Basic, Pootle (¿?) and on the wiki Basic Guide
http://wiki.openoffice.org/wiki/Documentation/BASIC_Guide/Numbers, are listed
of erroneous form (or incorrect notation, or at least confusing in my opinion)
the values accepted by variables of type Single and Double.
** Wiki:
Single variables:
Single variables can store any positive or negative floating point number
between 3.402823 x 10<sup>38</sup> and 1.401298 x 10<sup>-45</sup>.
Correctly:
Single variables can store any positive floating point number between 1.401298
x 10<sup>-45</sup> and 3.402823 x 10<sup>38</sup>, or any negative floating
point number between -3.402823 x 10<sup>38</sup> and -1.401298 x
10<sup>-45</sup>.
Double variables:
Double variables can store any positive or negative floating point numbers
between 1.79769313486232 x 10<sup>308</sup> and 4.94065645841247 x
10<sup>-324</sup>
Correctly:
Double variables can store any positive floating point numbers between
4.94065645841247 x 10<sup>-324</sup> and 1.79769313486232 x 10<sup>308</sup>,
or any negative floating point numbers between -1.79769313486232 x
10<sup>308</sup> and -4.94065645841247 x 10<sup>-324</sup>
** In Spanish OpenOffice.org Basic Help, page "tipos de variables" (incorrect
notation also):
Single: Las variables simples pueden tener valores positivos o negativos desde
3,402823 x 10E38 a 1,401298 x 10E-45
Double:
Las variables dobles pueden tener valores positivos o negativos desde
1.79769313486232 x 10E38 a 4.94065645841247 x 10E-324
** In English Pootle (incorrect notation):
1.797 x 10E30
Correctly:
1.797 E30 or 1.797 x 10<sup>30</sup>
Note: <sup>superscript</sup>
Sorry for my English disastrous. I use Google translator :)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 121307] Range of values for variables of type Double and Single
are wrong
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121307
--- Comment #3 from salva_sbs <sa...@openoffice.org> ---
exact = correct = pedantic?
Right. 'm pedantic ;)
--
You are receiving this mail because:
You are the assignee for the bug.
[Bug 121307] Range of values for variables of type Double and Single
are wrong
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121307
orcmid <or...@apache.org> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |orcmid@apache.org
--- Comment #1 from orcmid <or...@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.
[Bug 121307] Range of values for variables of type Double and Single
are wrong
Posted by bu...@apache.org.
https://issues.apache.org/ooo/show_bug.cgi?id=121307
--- Comment #2 from Rob Weir <ro...@apache.org> ---
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.
--
You are receiving this mail because:
You are the assignee for the bug.