Message268875
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. |
|
Date |
User |
Action |
Args |
2016-06-20 00:22:40 | steven.daprano | set | recipients:
+ steven.daprano |
2016-06-20 00:22:40 | steven.daprano | set | messageid: <1466382160.58.0.562689353089.issue27353@psf.upfronthosting.co.za> |
2016-06-20 00:22:40 | steven.daprano | link | issue27353 messages |
2016-06-20 00:22:37 | steven.daprano | create | |
|