Menu

#3081 abs(...) -> "bfloat: attempted conversion of floating-point infinity."

None
wont-fix
nobody
5
2016-03-14
2016-01-25
No

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

Discussion

  • David Scherfgen

    David Scherfgen - 2016-01-25

    This seems to be the cause:

    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) float(%e^(10000/3));
    (%o1)                             i.nfE-16128
    (%i2) float(%e^10000);
    (%o2)                       8.806818225658306b4342
    

    For some reason, Maxima doesn't "promote" the first result to a big float, but it does do so with the second one.

     
  • David Scherfgen

    David Scherfgen - 2016-01-27
    • status: open --> closed
     
  • Robert Dodier

    Robert Dodier - 2016-03-14
    • status: closed --> wont-fix
     
  • Robert Dodier

    Robert Dodier - 2016-03-14

    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".

     

Log in to post a comment.