floating point control in extensions

R

Robin Becker

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?
 
R

Robin Becker

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

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

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top