Python Library Reference
Previous: Up: 26.13 fpectl Next:


26.13.1 Example

The following example demonstrates how to start up and test operation of the fpectl module.

>>> import fpectl
>>> import fpetest
>>> fpectl.turnon_sigfpe()
>>> fpetest.test()
overflow PASS
FloatingPointError: Overflow
div by 0 PASS
FloatingPointError: Division by zero
 [ more output from test elided ]
>>> import math
>>> math.exp(1000)
Traceback (most recent call last):
 File "<stdin>", line 1, in ?
FloatingPointError: in math_1


Python Library Reference
Previous: Up: 26.13 fpectl Next:

Release 2.5.2, documentation updated on 21st February, 2008.
See About this document... for information on suggesting changes.

AltStyle によって変換されたページ (->オリジナル) /