Ticket #9689: 9689-sinh-noise-fix.patch

File 9689-sinh-noise-fix.patch, 858 bytes (added by drkirkby, 11 years ago)

Solves the numerical noise issue computing sinh(1.0). The archsinh case is more complex, and will be on another ticket.

  • sage/symbolic/expression.pyx

    # HG changeset patch
    # User David Kirkby <david.kirkby@onetel.net>
    # Date 1281047275 -3600
    # Node ID 6ae681c64e9fc38f209d5ad2edfd0c0c5091cf20
    # Parent  c55d110fbaef2e284e2d2e93f9bb9cd5da573640
    #9689 Numerical noise on devel/sage-main/sage/symbolic/expression.pyx when computing sinh(1.0). A high precision value would be 1.17520119364380145688238185059560081515571798133409587022957
    
    diff -r c55d110fbaef -r 6ae681c64e9f sage/symbolic/expression.pyx
    a b  
    49814981            sage: SR(1.0).sinh()
    49824982            1.17520119364380
    49834983            sage: maxima('sinh(1.0)')
    4984             1.175201193643801
     4984            1.17520119364380...
    49854985
    49864986            sinh(1.0000000000000000000000000)
    49874987            sage: SR(1).sinh().n(90)