Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

(no subject)

  • Dan Gildea
    Dan Gildea
    2013-12-15

    The following test is failing with gcl and ecl:

    closeto(
      gamma(2.0^-256 + 1d-200*%i),
      rectform(1/(2.0^-256 + 1d-200*%i)),
      2d-15);
    true;
    

    With cmucl:

    Maxima branch_5_31_base_238_gf7e7ca9 http://maxima.sourceforge.net
    using Lisp CMU Common Lisp 20c release-20c (20C Unicode)
    Distributed under the GNU Public License. See the file COPYING.
    Dedicated to the memory of William Schelter.
    The function bug_report() provides bug reporting information.
    (%i1) gamma(2.0^-256 + 1d-200*%i);
    (%o1) 1.157920892373162e+77 - 1.34078079299426e-46 %i
    (%i2) :lisp(trace gamma-lanczos)

    (GAMMA-LANCZOS)
    (%i2) gamma(2.0^-256 + 1d-200*%i);

    0: (GAMMA-LANCZOS #C(8.636168555094445e-78 1.0e-200))
    1: (GAMMA-LANCZOS #C(1.0 1.0e-200))
    1: GAMMA-LANCZOS returned #C(1.0 -5.772156649015329e-201)
    0: GAMMA-LANCZOS returned #C(1.157920892373162e77 -1.3407807929942597e-46)
    (%o2) 1.157920892373162e+77 - 1.34078079299426e-46 %i

    With ecl:

    Maxima branch_5_31_base_238_gf7e7ca9 http://maxima.sourceforge.net
    using Lisp ECL 13.5.1
    Distributed under the GNU Public License. See the file COPYING.
    Dedicated to the memory of William Schelter.
    The function bug_report() provides bug reporting information.
    (%i1) :lisp(trace gamma-lanczos)

    (GAMMA-LANCZOS)
    (%i1) gamma(2.0^-256 + 1d-200*%i);

    1> (GAMMA-LANCZOS #C(8.636168555094445e-78 1.e-200))
    | 2> (GAMMA-LANCZOS #C(1.0 1.e-200))
    | <2 (GAMMA-LANCZOS #C(0.9999999999999999 -5.772156649015328e-201))
    <1 (GAMMA-LANCZOS #C(1.1579208923731618e77 -1.3407807929942595e-46))
    (%o1) 1.1579208923731618e+77 - 13.407807929942595e-47 %i
    (%i2)