A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2004-July/046102.html below:

[Python-Dev] decimal.py signals & traps

[Python-Dev] decimal.py signals & trapsTim Peters tim.peters at gmail.com
Tue Jul 13 05:41:02 CEST 2004
[Michael Hudson] 
>> Well, there's an argument that this may not be the most natural
>> interface for a C implementation or for an implementation of such
>> things for floats -- but this is an argument involving predicting the
>> future, so probably should be ignored.

[Greg Ewing]
> I don't think it should be ignored. If the future is uncertain, surely
> it would be better to err on the side of *not* exposing implementation
> details?

Since virtually all modern processors implement sticky flags, trap
enablers, and rounding modes in FPU context & control registers,
virtually all modern compilers support some idiosyncratic way to set
and query them.  Google on ieee_flags for one extreme in C, entirely
string-based.  Google on _control87 and/or _controlfp for the other C
extreme, passing ints, with a pile of #defines to give different bits
different meanings.

Both of those actually hide the implementation quite well -- although
the latter is most often implemented in such a way that the bit
positions remarkably <ahem> correspond exactly to their meanings in
the Pentium instructions that fiddle FPU context.
More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4