Bug 33101
Summary: | round(.5) (still) produces wrong results | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Joe Harrington <jhmail> |
Component: | gnumeric | Assignee: | Owen Taylor <otaylor> |
Status: | CLOSED RAWHIDE | QA Contact: | |
Severity: | medium | Docs Contact: | |
Priority: | medium | ||
Version: | 7.0 | CC: | jhmail |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2001-03-26 15:23:44 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Joe Harrington
2001-03-24 21:41:14 UTC
These questions really should be addressed upstream as recommended in Havoc's original response (bugzilla.gnome.org, gnumeric-list), since Red Hat does not maintain the package. But I investigated this some more and found: - gnumeric never (to my knowledge) implemented round-to-even - it always tried to implement round-up like excel. - versions of gnumeric older than 0.62 may appeared to not due this due to the limits of floating point precision. (0.015 does not have a precise representation as a float, but is rather represented as something like 0.0149999, so rounding 0.015 produces 0.01, not 0.02 as you expected.) - new versions of gnumeric have some tweaks to the floor/ceiling code to try to produce the "expected" result rather than the mathematically correct result at edge cases. - This has nothing to do with IEEE rounding modes. - I suspect the IRS has bigger worries than how you round the pennies on your return. (All versions of gnumeric should round the dollars correctly, since half integers have exact representations as float point numbers.) Thanks for the report. (I'm marking this as resolved Rawhide, since it is fixed upstream, though we don't actually have a sufficiently new version in Rawhide to fix this. You can get a newer version by compiling from sources, or probably from getting the gnumeric package from www.ximian.com.) |