Bug 1299246 - Wrong results for negative exponents
Wrong results for negative exponents
Status: CLOSED EOL
Product: Fedora
Classification: Fedora
Component: gnome-calculator (Show other bugs)
22
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Ray Strode [halfline]
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-01-17 14:31 EST by NM
Modified: 2016-07-19 14:55 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-07-19 14:39:46 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description NM 2016-01-17 14:31:31 EST
Description of problem:
Calculator returns wrong results for negative exponents
for example    e^(-0.1) - 1/e^(0.1)   =   1.606938044×10⁶⁰ instead of 0

Version-Release number of selected component (if applicable):
3.16.2

How reproducible:
always

Steps to Reproduce:
1.type:     e^(-0.1) - 1/e^(0.1)
2.hit calculate


Actual results:
1.606938044×10⁶⁰

Expected results:
0

Additional info:
none
Comment 1 Dave Allan 2016-04-13 11:04:19 EDT
I'm seeing what might be the same behavior, also 3.16.2 on fully updated F22:

8^(−1÷3) gives 3.061802069×10²⁰⁰

4^-.5 gives 5.357543036×10³⁰⁰

100% reproducible, happens regardless of calculator mode, regardless of whether I type the expression in or use the button.  This is so bizarre I feel like I must be doing something wrong, and yet I cannot find any way to enter the expression that produces correct results.
Comment 2 Dave Allan 2016-04-13 11:39:04 EDT
FWIW, I asked around on IRC, and someone in #gnome on GIMPnet reports corect behavior on 3.20.1 and someone on #fedora on freenode reports the same behavior I'm seeing on 3.18.1 on F23.
Comment 3 Dave Allan 2016-04-13 12:05:43 EDT
Aha, this is https://bugzilla.gnome.org/show_bug.cgi?id=756960 which is fixed upstream by 5722513a0bb1903f5602a55dcfbb1ac7013003aa

A backport would not be trivial from what I can see, but this is not my area of expertise.  :(
Comment 4 Fedora End Of Life 2016-07-19 14:39:46 EDT
Fedora 22 changed to end-of-life (EOL) status on 2016-07-19. Fedora 22 is
no longer maintained, which means that it will not receive any further
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.
Comment 5 Dave Allan 2016-07-19 14:55:19 EDT
It's fixed in F24, FWIW

Note You need to log in before you can comment on or make changes to this bug.