999^99=0 ???

Issue #498 closed
Former user created an issue

Originally reported on Google Code with ID 498

Steps to reproduce:

Type 999^99 and press enter

Expected behavior:

A number. Or an indication that the calculator can't make this calculation

Experienced behavior:

zero result

Product version:

SpeedCrunch 0.11
(Qt 4.8.5)

Operating system:

Windows 7

Additional Information:

Reported by eladeyal on 2014-04-20 10:23:40

<hr> * Attachment: SCRSH.PNG<br>SCRSH.PNG

Comments (8)

  1. Former user Account Deleted
    This behavior is reproducible when you have "Fixed decimal" as the result format. On
    any other format it works fine.
    

    Reported by ivycarp on 2014-04-23 14:04:18

  2. Former user Account Deleted
    Indeed it happens only in that result format. Thanks for reporting, will have a look
    as soon as I find the time.
    

    Reported by helder.pereira.correia on 2014-04-27 05:01:36 - Status changed: Accepted - Labels added: Type-Defect, Priority-High, Milestone-0.12

  3. Former user Account Deleted
    The problem comes from float_round() which returns an (ignored) error and set the result
    to NaN when the number to round contains too much digits (more than maxdigits). The
    attached patch seems to do the trick (but the math lib is too hairy for me to understand
    it fully, so maybe the patch breaks something).
    

    Reported by teyut@free.fr on 2014-05-19 00:14:10

    <hr> * Attachment: issue498_fixdec999^99.patch

  4. Former user Account Deleted
    Fixed in revision a151b86. Thanks, Tey. When in doubt, run the tests ;)
    

    Reported by helder.pereira.correia on 2014-06-10 23:51:31 - Status changed: Fixed

  5. Former user Account Deleted
    Issue 517 has been merged into this issue.
    

    Reported by helder.pereira.correia on 2014-08-03 17:53:30

  6. Log in to comment