Bug 1299246 - Wrong results for negative exponents
Summary: Wrong results for negative exponents
Keywords:
Status: CLOSED EOL
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-calculator
Version: 22
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Ray Strode [halfline]
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-01-17 19:31 UTC by NM
Modified: 2016-07-19 18:55 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2016-07-19 18:39:46 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description NM 2016-01-17 19:31:31 UTC
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 15:04:19 UTC
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 15:39:04 UTC
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 16:05:43 UTC
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 18:39:46 UTC
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 18:55:19 UTC
It's fixed in F24, FWIW


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