On 09/06/2013 12:07 AM, Robert Dodier wrote:
> Hmm, with GCL 2.6.9, I get:
>
> (%i4) float(bfloat(1000!)^0.01);
> (%o4) 4.7429270206609955E+25
It's kinda strange, on the command line I am also seeing
what you see. But I am pretty sure I didn't see it before.
At any rate, this still fails:
maxima-5.31.0-gcl-2.6.9 --batch-string="float(bfloat(1000\!)^.01);"
The earlier versions of gcl do give the expected result with this
line.
Maxima version: "5.31.0"
Maxima build date: "2013-09-05 00:14:06"
Host type: "x86_64-unknown-linux-gnu"
Lisp implementation type: "GNU Common Lisp (GCL)"
Lisp implementation version: "GCL 2.6.9"
> (%i5) build_info ();
> (%o5)
> Maxima version: "5.31.0_6_ga50546b"
> Maxima build date: "2013-09-05 10:23:43"
> Host type: "i686-pc-linux-gnu"
> Lisp implementation type: "GNU Common Lisp (GCL)"
> Lisp implementation version: "GCL 2.6.9"
>
> > I think maxima is not trying hard enough to get the correct answer. I
> > suppose it would slow things down, but it would be possible to give a
> > correct double float answer.
>
> Well, the code to evaluate floating point results essentially assumes
> that one can get a float result by starting with float arguments and
> pushing them through any functions. That mostly works OK but fails in
> this case because there is some problematic intermediate result.
> To overcome that problem, one could (I guess) carry out an analysis
> of the expression in question and devise a way (e.g. pattern matching
> to find an appropriate heuristic) to evaluate it to a number. I think
> that would be valuable and interesting, and perhaps even tractable --
> it could be constructed as a stand-alone function until it seems ready
> to replace the existing 'float' function.
>
> best
>
> Robert Dodier
>
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima