detecting lisp overflow



On Mar. 17, 2013, Raymond Toy wrote

>You don't have to convert to strings, which would be a pretty bad
>approach.  Let RESULT be the list that is printed above.  Then you can
>do
>
>(float-inf-p (elt result 1))
>
>That should give T since the second element of result is
>#<1.#inf00e+000>, which, I guess, is gcl's printed representation of
>infinity.

This suggestion is apparently not working for gcl:
----------------------------------------------------------
(%i1) :lisp (float-inf-p (elt '(100.0 #<1.#INF00e+000>) 1))
Maxima encountered a Lisp error:

 Error in MACSYMA-TOP-LEVEL [or a callee]: The default dispatch macro 
signalled an error.

(%i1) :lisp (float-inf-p (elt (list 100.0 #<1.#INF00e+000>) 1))
Maxima encountered a Lisp error:

 Error in MACSYMA-TOP-LEVEL [or a callee]: The default dispatch macro 
signalled an error.

(%i1) :lisp (float-inf-p (elt '(100.0 #<1.#INF00e+000>) 0))
Maxima encountered a Lisp error:

 Error in MACSYMA-TOP-LEVEL [or a callee]: The default dispatch macro 
signalled an error.
-------------------------------------------------

On Mar. 17, 2013, Richard Fateman wrote:

> for  GCL..
>
>
>infp(x):=  ?float\-inf\-p(x);
>
>infp(A[2])  will return true  iff A[2] is an infinite floating point
>object.
>
>That's all.  no reading, no writing, no strings.
>
>infp(%e^1000.0) returns true.
>infp(%e^60.0) returns false.

but I am looking for something that works on the lisp code level
and I get:

--------------------------------
(%i1) infp(x):=  ?float\-inf\-p(x);
(%o1) infp(x):=?float\-inf\-p(x)

(%i2) :lisp (funcall $infp #<1.#INF00e+000>)
Maxima encountered a Lisp error:

 Error in MACSYMA-TOP-LEVEL [or a callee]: The default dispatch macro 
signalled an error.

(%i2) :lisp (float-inf-p #<1.#INF00e+000>)
Maxima encountered a Lisp error:

 Error in MACSYMA-TOP-LEVEL [or a callee]: The default dispatch macro 
signalled an error.
-----------------------------------------
So I am still unable to inspect the elements of the lisp list
returned by adaptive-plot in the case of f.p. overflow.

Ted