Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fpectl module needs updating #39777

Closed
stevech mannequin opened this issue Jan 7, 2004 · 4 comments
Closed

fpectl module needs updating #39777

stevech mannequin opened this issue Jan 7, 2004 · 4 comments
Labels
stdlib Python modules in the Lib dir

Comments

@stevech
Copy link
Mannequin

stevech mannequin commented Jan 7, 2004

BPO 872265
Nosy @tim-one, @loewis, @akuchling

Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

Show more details

GitHub fields:

assignee = None
closed_at = <Date 2006-08-03.14:37:26.000>
created_at = <Date 2004-01-07.10:32:37.000>
labels = ['library']
title = 'fpectl module needs updating'
updated_at = <Date 2006-08-03.14:37:26.000>
user = 'https://bugs.python.org/stevech'

bugs.python.org fields:

activity = <Date 2006-08-03.14:37:26.000>
actor = 'akuchling'
assignee = 'none'
closed = True
closed_date = None
closer = None
components = ['Library (Lib)']
creation = <Date 2004-01-07.10:32:37.000>
creator = 'stevech'
dependencies = []
files = []
hgrepos = []
issue_num = 872265
keywords = []
message_count = 4.0
messages = ['19568', '19569', '19570', '19571']
nosy_count = 4.0
nosy_names = ['tim.peters', 'loewis', 'akuchling', 'stevech']
pr_nums = []
priority = 'normal'
resolution = 'wont fix'
stage = None
status = 'closed'
superseder = None
type = None
url = 'https://bugs.python.org/issue872265'
versions = ['Python 2.3']

@stevech
Copy link
Mannequin Author

stevech mannequin commented Jan 7, 2004

The fpectl module docs (Python Library Reference 3.4.2)
says
"Setting up a given processor to trap IEEE-754 floating
point errors currently requires custom code on a
per-architecture basis."

I think that is no longer accurate, we now have fenv.h,
which:

  • avoids the need for custom code, by using the
    standard C99 header file
  • should work on non-Unix and Unix systems

I think that the fpectl module could be rewritten and
greatly simplified using fenv.h
The Python module Numarray has done this and could be
used as an example.

@stevech stevech mannequin closed this as completed Jan 7, 2004
@stevech stevech mannequin added the stdlib Python modules in the Lib dir label Jan 7, 2004
@loewis
Copy link
Mannequin

loewis mannequin commented Jan 18, 2004

Logged In: YES
user_id=21627

Can you provide a patch? The tricky part is to ensure
backwards compatibility if you are fundamentally changing
the implementation strategy.

Also, what compilers on what architectures support fenv.h?
That it is part of C99 does not make it automatically
available on all systems.

@tim-one
Copy link
Member

tim-one commented Jan 18, 2004

Logged In: YES
user_id=31435

Note the NEWS file for 2.3 said

"""

  • The fpectl module is not built by default; it's dangerous or
    useless except in the hands of experts.
    """

The fpectl module should die. It certainly still requires custom
code on a per-platform basis regardless, since most C
compilers used to build Python predate C99. If we could
assume C99 (we can't, just thinking out loud), then a new
module offering full access to 754's features should supplant
fpectl (fpectl now has a very narrow view of the world).

@akuchling
Copy link
Member

Logged In: YES
user_id=11375

May as well close this bug; fpectl was a candidate for
deletion in 2.5 and may finally go away in 2.6, so no one is
going to update it.

@ezio-melotti ezio-melotti transferred this issue from another repository Apr 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stdlib Python modules in the Lib dir
Projects
None yet
Development

No branches or pull requests

2 participants