Learn how easy it is to sync an existing GitHub or Google Code repo to a SourceForge project! See Demo

Close

#590 sum wrong with numer flag

closed
nobody
5
2005-11-24
2004-08-11
Anonymous
No

(%i64) build_info ();

Maxima version: 5.9.0.9beta1
Maxima build date: 19:5 6/25/2004
host type: i686-pc-mingw32
lisp-implementation-type: Kyoto Common Lisp
lisp-implementation-version: GCL 2.6.2

I am testing a sum. but the sum result is not the same
when 'numer' is on/off, 289327664 compared to
0.00825405701325.

(%i67) u;
(%o67) 'SUM((-1/(8*i+6)-1/(8*i+5)-2/(8*i+4)+4/
(8*i+1))/16^i,i,1,a)

(%i68) u, a=2, simpsum;
(%o68) 1618091/196035840
(%i69) %, numer;
(%o69) 0.00825405701325

(%i70) u, a=2, simpsum, numer;

RAT replaced 0.0625 by 1//16 = 0.0625
(%o70) 289327664
------------------ %o70 is wrong------

(%i71) u, a=2, simpsum, bfloat;
(%o71) 8.25405701324819B-3
----------------- bfloat is right --------

Discussion

  • Barton Willis
    Barton Willis
    2004-08-17

    Logged In: YES
    user_id=895922

    Maybe this is a bug with GCL 2.6.2; here is the calculation
    using beta2 and GCL 2.7.0

    (%i3) display2d : false;
    (%o3) FALSE
    (%i4) u : 'SUM((-1/(8*i+6)-1/(8*i+5)-2/(8*i+4)+4/
    (8*i+1))/16^i,i,1,a)$

    (%i5) u, a=2, simpsum;

    (%o5) 1618091/196035840
    (%i6) %,numer;
    (%o6) 0.00825405701325
    (%i7) u, a=2, simpsum, numer;

    RAT replaced 0.0625 by 1//16 = 0.0625
    (%o7) 0.00825405701325
    (%i8) u, a=2, simpsum, bfloat;

    (%o8) 8.25405701324819B-3
    (%i9) build_info();

    Maxima version: 5.9.0.9beta2
    Maxima build date: 13:27 7/28/2004
    host type: i686-pc-mingw32
    lisp-implementation-type: Kyoto Common Lisp
    lisp-implementation-version: GCL 2.7.0

    Barton

     
  • Robert Dodier
    Robert Dodier
    2005-04-16

    Logged In: YES
    user_id=501686

    Another data point. I get the same results (exactly) as
    Barton Willis.

    (%i6) build_info();

    Maxima version: 5.9.1.1cvs
    Maxima build date: 18:54 4/12/2005
    host type: i686-redhat-linux-gnu
    lisp-implementation-type: GNU Common Lisp (GCL)
    lisp-implementation-version: GCL 2.6.6

     
  • Robert Dodier
    Robert Dodier
    2005-11-24

    • status: open --> closed
     
  • Robert Dodier
    Robert Dodier
    2005-11-24

    Logged In: YES
    user_id=501686

    The reported bug is not present in the current cvs version of
    Maxima.

    Thank you for your report. If you see this bug in a later version
    of Maxima, please submit a new bug report.