From: Raymond T. <rt...@us...> - 2009-12-14 04:56:00
|
Update of /cvsroot/maxima/maxima/tests In directory sfp-cvsdas-1.v30.ch3.sourceforge.com:/tmp/cvs-serv30905/tests Modified Files: rtest_expintegral.mac rtest_gamma.mac Log Message: Bug 2909980: optimization for log of bfloats Optimize computation of log of bfloats by using the fact that each bfloat is frac*2^exp, where 1/2 < frac <= 1. src/float.lisp: o Add new variable bigfloat_log2 to hold the current bigfloat value of log(2b0). o Add function fplog2 to return log(2b0) of the correct precision. o Modify big-float-log to compute logs using the formula log(frac*2^exp) = log(frac) + exp*log(2). tests/rtest_expintegral.mac: o Test 73 (expintegral_e(1,.25b0)) no longer is accurate to 64 digits; reduce accuracy to 63. tests/rtest_gamma.mac: o Test 636 (beta_incomplete(1b0,1,z)) is no longer exactly 1b0*z. Change test to allow a small error. Index: rtest_expintegral.mac =================================================================== RCS file: /cvsroot/maxima/maxima/tests/rtest_expintegral.mac,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- rtest_expintegral.mac 1 Aug 2009 13:07:02 -0000 1.7 +++ rtest_expintegral.mac 14 Dec 2009 04:55:50 -0000 1.8 @@ -261,7 +261,7 @@ test_value( expintegral_e(1,0.25b0), 1.044282634443738194536438161232282251891528374744802718635140468b0, - 64); + 63); true; test_value( Index: rtest_gamma.mac =================================================================== RCS file: /cvsroot/maxima/maxima/tests/rtest_gamma.mac,v retrieving revision 1.39 retrieving revision 1.40 diff -u -d -r1.39 -r1.40 --- rtest_gamma.mac 29 Oct 2009 17:49:06 -0000 1.39 +++ rtest_gamma.mac 14 Dec 2009 04:55:50 -0000 1.40 @@ -3165,8 +3165,9 @@ beta_incomplete(1.0,1,z); 1.0*z; -beta_incomplete(1.0b0,1,z); -1.0b0*z; +/* Unfortunate, but we don't get exactly 1.0b0 */ +(closeto(beta_incomplete(1.0b0,1,z)/z,1b0,1b-15)); +true; beta_incomplete(1.0,1,1/2); 0.5; beta_incomplete(1.0b0,1,1/2); |