I just came across something very strange: When doing abs(%e^(10000/3)+1);
, I get the error "bfloat: attempted conversion of floating-point infinity."
OK, you might think, it's just a huge number. But when removing the /3
, it works! It also works when removing the +1
.
Maxima branch_5_37_base_407_g2af0c38 http://maxima.sourceforge.net using Lisp GNU Common Lisp (GCL) GCL 2.6.12 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) abs(%e^(10000/3)+1); bfloat: attempted conversion of floating-point infinity. -- an error. To debug this try: debugmode(true); (%i2) abs(%e^10000+1); 10000 (%o2) %e + 1 (%i3) abs(%e^(10000/3)); 10000/3 (%o3) %e
This seems to be the cause:
For some reason, Maxima doesn't "promote" the first result to a big float, but it does do so with the second one.
Fixed by https://sourceforge.net/p/maxima/code/ci/2c7bf01b64711c4823fa025995fda9dd9794c18c/
Note that since the float-to-bigfloat promotion code has been moved to branch promote-float-to-bigfloat and reverted on master, this bug report is no longer applicable. I've marked it "wont-fix" to distinguish it from "closed".