#5129: [with patch, positive review] numerical noise in roots 
calculus/calculus.py
----------------------------+------------------------
       Reporter:  jsp       |        Owner:  mabshoff
           Type:  defect    |       Status:  closed
       Priority:  blocker   |    Milestone:  sage-3.3
      Component:  calculus  |   Resolution:  fixed
       Keywords:            |    Merged in:
        Authors:            |    Reviewers:
Report Upstream:  N/A       |  Work issues:
         Branch:            |       Commit:
   Dependencies:            |     Stopgaps:
----------------------------+------------------------
Changes (by chapoton):

 * upstream:   => N/A


Old description:

> {{{
> [jaap@peace sage-3.3.alpha0]$ ./sage -t
> "devel/sage/sage/calculus/calculus.py"
> sage -t  "devel/sage/sage/calculus/calculus.py"
> **********************************************************************
> File
> "/home/jaap/Download/sage-3.3.alpha0/devel/sage/sage/calculus/calculus.py",
> line 3206:
>     sage: f.roots(ring=CC)
> Expected:
>     [(-0.0588115223184495, 1), (1.36050567903502 + 1.51880872209965*I,
> 1), (-1.33109991787579 + 1.52241655183732*I, 1), (1.36050567903502 -
> 1.51880872209965*I, 1), (-1.33109991787580 - 1.52241655183732*I, 1)]
> Got:
>     [(-0.0588115223184495, 1), (1.36050567903502 + 1.51880872209965*I,
> 1), (-1.33109991787580 + 1.52241655183732*I, 1), (1.36050567903502 -
> 1.51880872209965*I, 1), (-1.33109991787580 - 1.52241655183732*I, 1)]
> **********************************************************************
> File
> "/home/jaap/Download/sage-3.3.alpha0/devel/sage/sage/calculus/calculus.py",
> line 3208:
>     sage: (2.5*f).roots(ring=RR)
> Expected:
>     [(-0.0588115223184494, 1)]
> Got:
>     [(-0.0588115223184495, 1)]
> **********************************************************************
> File
> "/home/jaap/Download/sage-3.3.alpha0/devel/sage/sage/calculus/calculus.py",
> line 3210:
>     sage: f.roots(ring=CC, multiplicities=False)
> Expected:
>     [-0.0588115223184495, 1.36050567903502 + 1.51880872209965*I,
> -1.33109991787579 + 1.52241655183732*I, 1.36050567903502 -
> 1.51880872209965*I, -1.33109991787580 - 1.52241655183732*I]
> Got:
>     [-0.0588115223184495, 1.36050567903502 + 1.51880872209965*I,
> -1.33109991787580 + 1.52241655183732*I, 1.36050567903502 -
> 1.51880872209965*I, -1.33109991787580 - 1.52241655183732*I]
> **********************************************************************
> 1 items had failures:
>    3 of  29 in __main__.example_81
> ***Test Failed*** 3 failures.
> For whitespace errors, see the file
> /home/jaap/Download/sage-3.3.alpha0/tmp/.doctest_calculus.py
>          [243.9 s]
> exit code: 1024
>
> ------------------------------
>
> }}}
>
> This is on Fedora 10, 32 bits.
>
> Jaap

New description:

 {{{
 [jaap@peace sage-3.3.alpha0]$ ./sage -t
 "devel/sage/sage/calculus/calculus.py"
 sage -t  "devel/sage/sage/calculus/calculus.py"
 **********************************************************************
 File
 "/home/jaap/Download/sage-3.3.alpha0/devel/sage/sage/calculus/calculus.py",
 line 3206:
     sage: f.roots(ring=CC)
 Expected:
     [(-0.0588115223184495, 1), (1.36050567903502 + 1.51880872209965*I,
 1), (-1.33109991787579 + 1.52241655183732*I, 1), (1.36050567903502 -
 1.51880872209965*I, 1), (-1.33109991787580 - 1.52241655183732*I, 1)]
 Got:
     [(-0.0588115223184495, 1), (1.36050567903502 + 1.51880872209965*I,
 1), (-1.33109991787580 + 1.52241655183732*I, 1), (1.36050567903502 -
 1.51880872209965*I, 1), (-1.33109991787580 - 1.52241655183732*I, 1)]
 **********************************************************************
 File
 "/home/jaap/Download/sage-3.3.alpha0/devel/sage/sage/calculus/calculus.py",
 line 3208:
     sage: (2.5*f).roots(ring=RR)
 Expected:
     [(-0.0588115223184494, 1)]
 Got:
     [(-0.0588115223184495, 1)]
 **********************************************************************
 File
 "/home/jaap/Download/sage-3.3.alpha0/devel/sage/sage/calculus/calculus.py",
 line 3210:
     sage: f.roots(ring=CC, multiplicities=False)
 Expected:
     [-0.0588115223184495, 1.36050567903502 + 1.51880872209965*I,
 -1.33109991787579 + 1.52241655183732*I, 1.36050567903502 -
 1.51880872209965*I, -1.33109991787580 - 1.52241655183732*I]
 Got:
     [-0.0588115223184495, 1.36050567903502 + 1.51880872209965*I,
 -1.33109991787580 + 1.52241655183732*I, 1.36050567903502 -
 1.51880872209965*I, -1.33109991787580 - 1.52241655183732*I]
 **********************************************************************
 1 items had failures:
    3 of  29 in __main__.example_81
 ***Test Failed*** 3 failures.
 For whitespace errors, see the file
 /home/jaap/Download/sage-3.3.alpha0/tmp/.doctest_calculus.py
  [243.9 s]
 exit code: 1024

 ------------------------------

 }}}

 This is on Fedora 10, 32 bits.

 Jaap

--

--
Ticket URL: <http://trac.sagemath.org/ticket/5129#comment:5>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
You received this message because you are subscribed to the Google Groups 
"sage-trac" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/sage-trac.
For more options, visit https://groups.google.com/d/optout.

Reply via email to