Skip to content

[doctest] mpmath.calculus.optimization.steffensen fails on alpha in 1.4.0a1 #838

@mgorny

Description

@mgorny

On alpha processor:

================================== FAILURES ==================================
_____________ [doctest] mpmath.calculus.optimization.steffensen ______________
1034 
1035     x* is a fixpoint of the iteration x_{k+1} = phi(x_k) if x* = phi(x*). For
1036     phi(x) = x**2 there are two fixpoints: 0 and 1.
1037 
1038     Let's try Steffensen's method:
1039 
1040     >>> f = lambda x: x**2
1041     >>> from mpmath.calculus.optimization import steffensen
1042     >>> F = steffensen(f)
1043     >>> for x in [0.5, 0.9, 2.0]:
Differences (unified diff with -expected +actual):
    @@ -5,5 +5,5 @@
              2.32831e-10          -2.84465e-27
              5.42101e-20           2.30189e-80
    -         2.93874e-39          -1.2197e-239
    +         2.93874e-39                     0
              8.63617e-78                     0
             7.45834e-155                     0

/var/tmp/portage/dev-python/mpmath-1.4.0_alpha1/work/mpmath-1.4.0a1/mpmath/calculus/optimization.py:1043: DocTestFailure

This was tested against 1.4.0a1. This has been tested by a volunteer, but I'm going to try getting access to the box, and testing on git.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugan unexpected problem or unintended behaviortesting

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions