[New-bugs-announce] [issue11012] Add log1p(), exp1m(), gamma(), and lgamma() to cmath

Raymond Hettinger report at bugs.python.org
Wed Jan 26 00:25:01 CET 2011


New submission from Raymond Hettinger <rhettinger at users.sourceforge.net>:

Where it makes sense, cmath needs to stay in-sync with the math module as much as possible:

  >>> set(dir(math)) - set(dir(cmath))
  {'pow', 'fsum', 'ldexp', 'hypot', 'fabs', 'floor', 'lgamma',
   'frexp', 'degrees', 'modf', 'factorial', 'copysign', 'ceil',
   'trunc', 'expm1', 'radians', 'atan2', 'erf', 'erfc', 'fmod',
   'log1p', 'gamma'}

At some point, it may make sense to implement cmath.fsum() along the lines of:
 
 c_fsum = lambda iterable: 
   complex(*map(fsum, zip(*((z.real, z.imag) for z in iterable))))

----------
assignee: mark.dickinson
components: Extension Modules
messages: 127070
nosy: mark.dickinson, rhettinger
priority: normal
severity: normal
stage: needs patch
status: open
title: Add log1p(), exp1m(), gamma(), and lgamma() to cmath
type: feature request
versions: Python 3.3

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue11012>
_______________________________________


More information about the New-bugs-announce mailing list