This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: expm1 and log1p
Type: enhancement Stage:
Components: Library (Lib) Versions:
process
Status: closed Resolution: rejected
Dependencies: Superseder:
Assigned To: Nosy List: kbriggs, rhettinger, tim.peters
Priority: normal Keywords:

Created on 2005-03-14 17:24 by kbriggs, last changed 2022-04-11 14:56 by admin. This issue is now closed.

Messages (5)
msg54414 - (view) Author: Keith Briggs (kbriggs) Date: 2005-03-14 17:24
Could we please have expm1 and log1p interfaced in the 
math module (where these exist in libm)?   These are 
essential for any serious mathematical applications.
lgamma would be nice too.
msg54415 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2005-03-14 17:39
Logged In: YES 
user_id=31435

Hard one, since none of those functions are required by the 
C89 standard, Python doesn't require more than C89, and the 
math module overwhelmingly consists of thin wrappers 
around the platform C's implementations.  When C99 is 
universally available, then it will be easy.  Before then, 
someone would have to volunteer non-trivial work (for 
example, Microsoft's C runtime doesn't supply any of these -- 
it's a x-platform mess).
msg54416 - (view) Author: Keith Briggs (kbriggs) Date: 2005-03-14 17:59
Logged In: YES 
user_id=888261

Is there an objection in principle to including something in the 
math module only if it is found in the system's libm?

If so, a solution would be to use a C implementation of expm1 
when it is not already supplied, for example from fdlibm:
http://www.netlib.org/fdlibm/
msg54417 - (view) Author: Tim Peters (tim.peters) * (Python committer) Date: 2005-03-14 18:20
Logged In: YES 
user_id=31435

Python code intends to be portable, and the math module 
hasn't yet included any platform-specific functions.

I used to write math libraries for a living, so I know about 
netlib <wink>.  If that's the intended approach to portability , 
it still needs someone to volunteer to do all the non-trivial 
coding, testing, doc, license-hassling, and x-platform config 
work.  Won't be me because I can't make time for it.

Note that you could easily write an extension module 
exposing these functions on _your_ platform (assuming your 
platform C supplies them).
msg54418 - (view) Author: Raymond Hettinger (rhettinger) * (Python committer) Date: 2005-06-03 01:34
Logged In: YES 
user_id=80475

For the reasons mentioned by Tim, closing this RFE.
History
Date User Action Args
2022-04-11 14:56:10adminsetgithub: 41695
2005-03-14 17:24:46kbriggscreate