don't NaN & infinities hide FP errors
FBatista at uniFON.com.ar
Wed Nov 17 14:15:23 CET 2004
[kartick_vaddadi at yahoo.com]
#- Since Python floats are implemented using C doubles,
#- assuming IEEE 754
#- compliance, certain operations should result in NaN or
#- infinity. Don't
#- such special values hide errors? Would we want our variables to be in
#- such states? I feel it would be better if a floating point
#- division by
#- zero (or other actions that produce NaNs or infinities) throws an
#- exception, just like an integer divide by zero.
Check Decimal FP, where you can control through the context, for example, if
0/0 returns NaN or throws an exception.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Python-list