cbrt calculates wrong sometimes
Originally reported on Google Code with ID 230
What steps will reproduce the problem?
Using Cbrt(x^3) for x < 5 everything is OK
1. Enter cbrt(5^3) = 5 Right
2. Enter cbrt(6^3) = 5,6 Wrong
3. Enter cbrt(7^3) = 7 Right
4. Enter cbrt(8^3) = 7,6 Wrong
5. Enter cbrt(9^3) = 8,6 Wrong
...
What is the expected output? What do you see instead?
the cbrt(x^3) must be x or not?
What version of the product are you using? On what operating system?
Windows XP(h) sc10.1 / Linux Kubuntu 2008.04 / 2008.10 / SC10.1
on
Linux Kubuntu 2008.04 / something v8... everything was OK
Reported by nurzuranmeldung@ich-will-net.de
on 2008-12-23 14:59:36
Comments (11)
-
Account Deleted -
Account Deleted ``` To save execution time in the early stages of the Newton-Raphson iteration, evaluations and, thus, comparisons are limited to as little as 2 digits only. If, by accident, an initial or intermidate result in this phase is closer to the true root than 0.1, the limited comparison returns "exact match", fooling the algorithm into thinking it has finished already, instead of increasing the working precision. This trap has been removed now; there is no early-out path any more. Even cbrt(1) is iterated until the algotithm says "known to 80 digits", although no step adds anything because the initial guess 1 is exact. This is a small price for a more robust algorithm. Since we had a similar bug some time ago, I now checked the whole range 1 - 1000 in steps of 0.01 to make sure the bug fix works. Once I have my git access ready, I will push the changes and set ths issue to state "fixed" ```
Reported by `wolf.lammen` on 2008-12-26 13:43:48 - Status changed: `Started` - Labels added: Type-Defect, Milestone-0.10.1
-
Account Deleted ``` fixed ```
Reported by `wolf.lammen` on 2008-12-29 22:37:43 - Status changed: `Fixed` - Labels added: Milestone-0.11 - Labels removed: Milestone-0.10.1
-
Account Deleted ``` Issue 291 has been merged into this issue. ```
Reported by `helder.pereira.correia` on 2009-06-02 22:02:04
-
Account Deleted ``` Issue 359 has been merged into this issue. ```
Reported by `helder.pereira.correia` on 2010-11-09 06:07:36
-
Account Deleted ``` Issue 375 has been merged into this issue. ```
Reported by `helder.pereira.correia` on 2011-04-08 07:28:38
-
Account Deleted ``` Issue 411 has been merged into this issue. ```
Reported by `helder.pereira.correia` on 2012-10-05 06:14:58
-
Account Deleted ``` Issue 413 has been merged into this issue. ```
Reported by `helder.pereira.correia` on 2012-10-05 06:15:26
-
Account Deleted Issue 542 has been merged into this issue.
Reported by
helder.pereira.correia
on 2014-12-25 11:02:05 -
repo owner - changed milestone to 0.11
- changed version to 0.10.1
- edited description
- changed component to functions
-
repo owner - changed status to closed
- Log in to comment
``` confirmed, going to check these ```
Reported by `wolf.lammen` on 2008-12-26 00:22:24