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.

Author steven.daprano
Recipients steven.daprano
Date 2016-06-20.00:22:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1466382160.58.0.562689353089.issue27353@psf.upfronthosting.co.za>
In-reply-to
Content
For Issue27181 (add geometric mean to statistics module), I need a function to calculate nth roots that is more accurate than pow(x, 1/n). E.g. math.pow(1000, 1/3) returns 9.999999999999998 instead of 10.0.

I have a pure-Python implementation of nroot which I believe is satisfactory, and I could use that, but I'm uncomfortable about making it a public function in statistics. It's not really a statistics function, its more general, and I think it would be generally useful enough that it should go into math.

To recap the options:

- leave nroot in statistics as a private function;
- leave it in statistics, but make it public;
- add it to math

I'm willing to do the first if there is no other alternative, reluctant to do the second, and think that the third is the most useful, but I don't have the ability to write a pure C version. If the math library was written in Python that would be the obvious place for it.
History
Date User Action Args
2016-06-20 00:22:40steven.dapranosetrecipients: + steven.daprano
2016-06-20 00:22:40steven.dapranosetmessageid: <1466382160.58.0.562689353089.issue27353@psf.upfronthosting.co.za>
2016-06-20 00:22:40steven.dapranolinkissue27353 messages
2016-06-20 00:22:37steven.dapranocreate