>>>>> "rif" == rif <[EMAIL PROTECTED]> writes:
rif> I am dependent on the following snippet of code:
rif> (let ((current-traps (cadr (member :traps (ext:get-floating-point-modes)))))
rif> (when (find :invalid current-traps)
rif> (progn
rif> (warn "WARNING: removing :invalid from floating-point-modes traps.")
rif> (ext:set-floating-point-modes :traps (remove :invalid
current-traps)))))
rif> The idea here is to make sure that the :invalid floating-point-mode
rif> trap is not set. This is important to me because I call a foreign
rif> library (R) that (for reasons I don't know) causes an invalid floating
rif> point operation, and without this set, CMUCL crashes when I try to
rif> start R.
What does "crashes" mean here?
rif> Unfortunately, while this code works fine on my desktop machine (Dell
rif> dual xeon), it seems to have no effect on my laptop (IBM T42). After
rif> running this snippet of code, :invalid still shows up in
rif> (ext:get-floating-point-modes). This is with CMUCL 19A.
rif> I believe that the IBM T42 has a Pentium M chip. Is this a known
rif> problem? Any suggestions?
I have not heard of such a problem before. From your description, I
take it that if you turn off invalid traps, it still seems to be on,
and doing invalid operations will get you into the debugger. Is that
right?
Can you try the following?
* (set-floating-point-modes :traps nil)
* (defun foo (x) (- x (/ x 2)))
* (compile 'foo)
* (foo ext:double-float-positive-infinity)
On my sparc, I get #<DOUBLE-FLOAT Quiet NaN>, which is what I would
expect when trying to compute infinity-infinity.
Ray