gcl-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Gcl-devel] Re: gcl-2.6.8-pre and maxima


From: Camm Maguire
Subject: [Gcl-devel] Re: gcl-2.6.8-pre and maxima
Date: Wed, 30 Dec 2009 17:43:27 -0500
User-agent: Gnus/5.11 (Gnus v5.11) Emacs/22.2 (gnu/linux)

Greetings!  It is most certainly the goal to maintain optimal maxima
testsuite performance under GCL.  

This was an inadvertent mistake on my part -- my apologies.  Will be
uploading -49 hopefully today to fix all maxima testsuite errors.

BTW, it would be most helpful if you could identify the main areas
where cmucl outperforms gcl on the testsuite, hopefully at the lisp
call level.

BTW^2, I'd also appreciate if you could identify the Gentoo objections
so I could address them.

In addition, we have newly introduced strict aliasing issues in gcc
4.4 for which I'd most appreciate suggested patches if anyone has
any.  This is a trivial issue, but I'd appreciate the time savings.  

I have a large uncommitted patch to gclcvs in the lurch.  A complete
overhaul to the fast-link function calling mechanism.  But I'm in the
middle of a book writing project and need to stay focused.

For those interested, here is the patched big_to_double:

double
big_to_double(object x)
{
  double d=mpz_get_d(MP(x));
  int s=mpz_sizeinbase(MP(x),2);
  /* int o=d>=0.0 ? 54 : 53; */
  int o=54;
  int r=s>=o ? mpz_tstbit(MP(x),s-o) : 0;
  /* if (d<0.0 && r>=0) r=1-r; */
  if (r) {
    union {double d;int i[2];} u;
    
    u.i[HIND]=0;
    u.i[LIND]=1;

    d+=(d>0.0 ? 1.0 : -1.0)*set_exponent(u.d,double_exponent(d)-53);
  }
  return d;

}

The correction criterion fires needlessly at times, and of course
requires IEEE, but I'm out of time to improve this further at the
moment.


Take care,

"Andrey G. Grozin" <address@hidden> writes:

> Hello *,
> Happy New Year to everybody!
>
> Recently I compiled maxima-5.20.1 (the latest released version) by as
> many lisps as I could (on a Gentoo Linux x86 box), and run its
> testsuits. In particular, I checked out gcl-2.6.8 pre from cvs a few
> days ago, configured it with --enable-dynsysgmp --disable-xdr
> --enable-maxpage=131072 and compiled. Only 3 lisps gave no unexpected
> errors: clisp-2.48, sbcl-1.0.33, and clozurecl-1.4. gcl gave a large
> number of errors in the testsuit. Real times (in seconds) of running
> it are:
>
> clisp-2.48     1602
> cmucl-20a       663
> sbcl-1.0.33     892
> gcl-2.6.8 pre   818
> clozurecl-1.4  1390
> ecl-9.12.3     2191
>
> Unexpected errors in maxima compiled by gcl are:
>
> rtest14:
> ********************** Problem 151 ***************
> Input:
> closeto(gamma(%i + 1) - (0.49801566811836 - 0.15494982830181 %i), 1.0E-14)
>
>
> Result:
> gamma: overflow in GAMMA-LANCZOS.
> gamma: overflow in GAMMA-LANCZOS.
> error-catch
>
> This differed from the expected result:
> true
>
> (also problems 152, 153)
>
> rtest15:
> ********************** Problem 231 ***************
> Input:
> ev(Y1, numer)
>
>
> Result:
> error-catch
>
> This differed from the expected result:
> [0.16010712672873, 0.31821739764818, 0.67928220872456, - 0.25544752010866,
> 0.45500004582164, 1.513096652187913, 1.631906796078438, 1.153564994895108,
> - 1.945910149055313, 0.93543756289255, 6.548062940247834,
> 1.427448757889531 %i, 0.14384103622589 - 1.570796326794897 %i,
> 2.644120761058629, 2.633915793849633, 0.1423756431678, 0.14384103622589,
> 1.010221447322645, 7.047554385466551, 6.976247043798608, 0.98988197355171,
> 0.14334354757246, 0.14189319376693, 0.37796447300923, 1.427448757889531,
> 1.428899272190733, 1.570796326794897 - 2.633915793849634 %i,
> 2.633915793849634 %i, 0.14334756890537, 0.14189705460416,
> 0.98981326044662,
> 6.952316038379697, 7.023866335396166, 1.010291577169605, 0.14237172979226,
> 0.14383695943619, 0.15415067982726, 0.14831179749879, 0.14552316969849,
> - 7.363980242224349, 50.3574714369117, - 687.6815220686585]
>
> (similarly 232, 234, 235, 237, 238, 240, 241, 243, 244)
>
> rtest3:
> ********************** Problem 82 ***************
> Input:
> ev(%, numer)
>
>
> Result:
> 1.0
>
> This differed from the expected result:
> 3.679093980405881
>
> rtest_trig:
> ********************** Problem 58 ***************
> Input:
> block([buggy : []], for f in invhtrig do (triginverses : true,
> xtrig : subst(f, x, htrig), triginverses : false,
> xtrig : xtrig - subst(f, x, htrig), xtrig :
> buildq([L : map(nounify(cabs), xtrig)], lambda([], L)),
>                              i
> for i thru 9 do block([xi : ----, xtrigi],
>                             10.0
> xtrigi : apply(buildq, [[funmake(:, ['x, xi])], xtrig]),
> if apply('max, ev(xtrigi(), nouns)) >= 9.9999999999999998E-13
>  then buggy : cons(xtrigi, buggy))), buggy)
>
>
> Result:
> [lambda([], [abs(0.9 - cosh(acosh(0.9))),
> abs(sqrt(0.9 - 1) sqrt(0.9 + 1) - sinh(acosh(0.9))),
> !sqrt(0.9 - 1) sqrt(0.9 + 1)                   !
> !--------------------------- - tanh(acosh(0.9))!, 0, 0, 0]),
> !            0.9                               !
> lambda([], [abs(0.8 - cosh(acosh(0.8))),
> abs(sqrt(0.8 - 1) sqrt(0.8 + 1) - sinh(acosh(0.8))),
> !sqrt(0.8 - 1) sqrt(0.8 + 1)                   !
> !--------------------------- - tanh(acosh(0.8))!, 0, 0, 0]),
> !            0.8                               !
> lambda([], [abs(0.7 - cosh(acosh(0.7))),
> abs(sqrt(0.7 - 1) sqrt(0.7 + 1) - sinh(acosh(0.7))),
> !sqrt(0.7 - 1) sqrt(0.7 + 1)                   !
> !--------------------------- - tanh(acosh(0.7))!, 0, 0, 0]),
> !            0.7                               !
> lambda([], [abs(0.6 - cosh(acosh(0.6))),
> abs(sqrt(0.6 - 1) sqrt(0.6 + 1) - sinh(acosh(0.6))),
> !sqrt(0.6 - 1) sqrt(0.6 + 1)                   !
> !--------------------------- - tanh(acosh(0.6))!, 0, 0, 0]),
> !            0.6                               !
> lambda([], [abs(0.5 - cosh(acosh(0.5))),
> abs(sqrt(0.5 - 1) sqrt(0.5 + 1) - sinh(acosh(0.5))),
> !sqrt(0.5 - 1) sqrt(0.5 + 1)                   !
> !--------------------------- - tanh(acosh(0.5))!, 0, 0, 0]),
> !            0.5                               !
> lambda([], [abs(0.4 - cosh(acosh(0.4))),
> abs(sqrt(0.4 - 1) sqrt(0.4 + 1) - sinh(acosh(0.4))),
> !sqrt(0.4 - 1) sqrt(0.4 + 1)                   !
> !--------------------------- - tanh(acosh(0.4))!, 0, 0, 0]),
> !            0.4                               !
> lambda([], [abs(0.3 - cosh(acosh(0.3))),
> abs(sqrt(0.3 - 1) sqrt(0.3 + 1) - sinh(acosh(0.3))),
> !sqrt(0.3 - 1) sqrt(0.3 + 1)                   !
> !--------------------------- - tanh(acosh(0.3))!, 0, 0, 0]),
> !            0.3                               !
> lambda([], [abs(0.2 - cosh(acosh(0.2))),
> abs(sqrt(0.2 - 1) sqrt(0.2 + 1) - sinh(acosh(0.2))),
> !sqrt(0.2 - 1) sqrt(0.2 + 1)                   !
> !--------------------------- - tanh(acosh(0.2))!, 0, 0, 0]),
> !            0.2                               !
> lambda([], [abs(0.1 - cosh(acosh(0.1))),
> abs(sqrt(0.1 - 1) sqrt(0.1 + 1) - sinh(acosh(0.1))),
> !sqrt(0.1 - 1) sqrt(0.1 + 1)                   !
> !--------------------------- - tanh(acosh(0.1))!, 0, 0, 0])]
> !            0.1                               !
>
> This differed from the expected result:
> []
>
> ********************** Problem 61 ***************
> Input:
> block([buggy : []], for f in alltrig do for p in pts do block([e,
> fop : op(f)], e : buildq([p, fop], lambda([],
> cabs(float(rectform(fop(p))) - fop(float(p))))),
> if e() > 1.0E-13 then buggy : cons(e, buggy)), buggy)
>
>
> Result:
> error-catch
>
> This differed from the expected result:
> []
>
> rtest_gamma:
> ********************** Problem 57 ***************
> Input:
> closeto((%i + 1.3)!,
> 5.406144679098492753783510221774150545811250310680842509749769021b-1 %i
>  + 7.191409365372817791473038599462048083254863806205029128993808432b-1,
> 1.0E-14)
>
>
> Result:
> gamma: overflow in GAMMA-LANCZOS.
> error-catch
>
> This differed from the expected result:
> true
>
> (similarly 58, 59, 121, 123, 124, 125, 126, 127, 128, 129, 130, 131,
> 132, 133, 134, 150, 152, 153, 155, 183, 208, 209, 210, 211, 212, 329,
> 331, 333, 335, 337, 339, 343, 345, 347, 349, 360, 362, 364, 366, 368,
> 371, 373, 385, 387, 397, 405, 433, 465, 467)
>
> ********************** Problem 271 ***************
> Input:
> closeto(gamma_incomplete(0, 5.0b-1), 5.5977359477616081174679593931509b-1,
>
> 1.0b-30)
>
>
> Result:
> fplog: argument must be positive; found: 0
> error-catch
>
> This differed from the expected result:
> true
>
> (similarly 272, 273, 274, 279, 280, 281, 282)
>
> ********************** Problem 513 ***************
> Input:
> closeto(erf(%i - 0.75),
> 5.39788632227100129936591912063260716699852732091113612337142798b-1 %i
>  - 1.372897192365736489613456241111589390954675856186764729607156305b0,
> 5.0E-15)
>
>
> Result:
> 1.475201161973283433571521529724093004245407004777100353139451755b0
>
> This differed from the expected result:
> true
>
> (similarly 514, 515, 516, 543, 544, 649, 650, 651, 652, 653, 654, 659,
> 660, 661)
>
> ********************** Problem 600 ***************
> Input:
> relerror(fresnel_s(%i + 2.0),
> - 3.672546488399143842838787627677917885752587065976755449373500438b1 %i
>  - 1.55877511044045873274827879779788164319873037890410184689856261b1,
> 4.0000000000000001E-13)
>
>
> Result:
> 1.0b0
>
> This differed from the expected result:
> true
>
> (similarly 602, 622, 624, 674, 675, 676, 677, 678, 679, 680)
>
> ********************** Problem 643 ***************
> Input:
>                         1
> beta_incomplete(1.0, 2, -)
>                         2
>
>
> Result:
> 0.875
>
> This differed from the expected result:
> 0.375
>
> ********************** Problem 646 ***************
> Input:
>                              1
> beta_incomplete(1.0, 2, %i + -)
>                              2
>
>
> Result:
> 0.5 %i + 1.375
>
> This differed from the expected result:
> 0.5 %i + 0.875
>
> ********************** Problem 658 ***************
> Input:
>                                     3
> closeto(float(beta_incomplete(1, 2, -)) - beta_incomplete(1.0, 2.0,
> 1.5), 0.0,
>                                     2
>
> 1.0000000000000001E-15)
>
>
> Result:
> 0.5
>
> This differed from the expected result:
> true
>
> ********************** Problem 662 ***************
> Input:
>                                  5       3
> closeto(float(beta_incomplete(2, -, %i + -))
>                                  2       2
>             - beta_incomplete(2.0, 2.5, %i + 1.5), 0.0,
> 1.0000000000000001E-15)
>
>
> Result:
>       0.5069651361378                    2
> sqrt((--------------- - 0.97533390711133)
>             5/2
>            2
>
> 4.558539125134461 2
>                                      + (0.80584348192169 - 
> -----------------) )
>                                                                   5/2
>                                                                  2
>
> This differed from the expected result:
> true
>
> rtest_expintegral:
> ********************** Problem 106 ***************
> Input:
> test_value(expintegral_e(%i - 0.25, 0.5),
>                                    0.70296755533484 -
> 1.085458385940826 %i, 15)
>
>
> Result:
> gamma: overflow in GAMMA-LANCZOS.
> error-catch
>
> This differed from the expected result:
> true
>
> (similarly 107)
>
> As you can see, there are a lot of test failures, mainly in numerics
> (though in 1 case gcl-maxima produced a result which is not numeric at
> all). Many of them are related to overflows in GAMMA-LANCZOS, but
> there are a lot of others.
>
> I remember that a few years ago gcl-maxima passed all tests. True, a
> lot of tests are new, and test new code in maxima (in particular,
> gamma-related stuff).
>
> Is there any hope that gcl will improve and gcl-maxima will pass all
> tests (like clisp, sbcl, clozurecl)? gcl maxima is still fast. I don't
> know if the testsuit can serve as a reasonable benchmark or not, but
> according to it, only cmucl is faster. cmucl maxima also has some test
> failures, though not as many as gcl (some of them coinside).
>
> By the way, gcl was "masked" in Gentoo (meaning that Gentoo users
> cannot install it without some extra special efforts), and gcl-based
> maxima too. The recommended common lisp for running maxima in Gentoo
> is sbcl.
>
> best wishes to everybody in the new year,
>
> Andrey
>
>
>
>

-- 
Camm Maguire                                        address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens."  --  Baha'u'llah




reply via email to

[Prev in Thread] Current Thread [Next in Thread]