Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Python (http://www.velocityreviews.com/forums/f43-python.html)
-   -   floating point control in extensions (http://www.velocityreviews.com/forums/t319617-floating-point-control-in-extensions.html)

Robin Becker 07-13-2003 09:52 AM

floating point control in extensions
 
Is there a preferred way to intercept floating point exceptions in
python extensions? I assume one should be careful to restore any
existing error handler. Does python have a standard mechanism for
setting up fpu control words etc?
--
Robin Becker

Robin Becker 07-14-2003 08:03 AM

Re: floating point control in extensions
 
In article <mailman.1058119520.21914.python-list@python.org>, Tim Peters
<tim.one@comcast.net> writes
.......
>Python itself assumes that no-stop mode is in effect (the IEEE-754 mandated
>default: all FPU traps are disabled).
>

.....
That at least makes resetting easy when one can do it.



I guessed all Python floating point ops are tested either pre or post
for the correct outcome, but then I tried

>>> a=1e290
>>> a

1.0000000000000001e+290
>>> a*a1.#INF
>>>


so I suppose only the obvious things are tested.
-it's hard being an fpu'ly yrs-
Robin Becker


All times are GMT. The time now is 07:49 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.