Ticket #8185: 8185-numerical-noise.patch

File 8185-numerical-noise.patch, 1009 bytes (added by David Kirkby, 13 years ago)
  • sage/calculus/functional.py

    # HG changeset patch
    # User David Kirkby <david.kirkby@onetel.net>
    # Date 1265312697 0
    # Node ID 620906ad2e2b1e01aa666da925663981d00be1b1
    # Parent  eec4c09a0fdcb60829146f15b53a30cb8a9756c8
    Trac #8185 "numerical noise + crash on sage/calculus/functional.py"
    
    This fixes a numerical noise issue seen on two SPARC machines.
    A crash which appeared one machine (hence title), is unrelated to this.
    
    Previously, there was:
    
    Expected:
        0.85914091422952255
    Got:
        0.85914091422952277
    
    This fixes that problem.
    
    diff -r eec4c09a0fdc -r 620906ad2e2b sage/calculus/functional.py
    a b  
    193193        sage: area = integral(integral(exp(y^2),x,0,y),y,0,1); area
    194194        1/2*e - 1/2
    195195        sage: float(area)
    196         0.85914091422952255
     196        0.859140914229522...
    197197   
    198198    We compute the line integral of `\sin(x)` along the arc of
    199199    the curve `x=y^4` from `(1,-1)` to