Changeset 7511:38578c1fd58a


Ignore:
Timestamp:
12/02/07 11:12:42 (5 years ago)
Author:
William Stein <wstein@…>
Branch:
default
Message:

Followup patch for trac #1134 -- improve documentation of integration in calculus.py

File:
1 edited

Legend:

Unmodified
Added
Removed
  • sage/calculus/calculus.py

    r7510 r7511  
    19151915        Return a floating point machine precision numerical 
    19161916        approximation to the integral of self from a to b, computed 
    1917         using floating point arithmetic and the GSL scientific 
    1918         library. 
     1917        using floating point arithmetic via maxima. 
    19191918 
    19201919        INPUT: 
     
    19731972        Computing to higher precision we see the truth: 
    19741973            sage: f.n(200) 
    1975             -0.00000000000074992740280181431112064614366496792309675391526978827185055 
     1974            -0.00000000000074992740280181431112064614366622348652078895136533593355718 
    19761975            sage: f.n(300) 
    1977             -0.000000000000749927402801814311120646143662663009137292462589621789352092802261939388897590086687280282 
     1976            -0.000000000000749927402801814311120646143662663009137292462589621789352095066181709095575681963967103004 
    19781977 
    19791978        Now numerically integrating, we see why the answer is wrong: 
     
    19891988            '2.565728500561051482917356396 E-127' 
    19901989            sage: old_prec = gp.set_real_precision(50) 
     1990            sage: gp.eval('intnum(x=17,42,exp(-x^2)*log(x))') 
    19911991            '2.5657285005610514829173563961304785900147709554020 E-127' 
    1992  
     1992            sage: gp.set_real_precision(old_prec) 
     1993            57 
     1994             
    19931995        Note that the input function above is a string in PARI 
    19941996        syntax.  
Note: See TracChangeset for help on using the changeset viewer.