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 mark.dickinson
Recipients mark.dickinson, martin.panter, rhettinger, steven.daprano, tim.peters
Date 2016-08-14.12:05:37
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471176337.54.0.863617639651.issue27761@psf.upfronthosting.co.za>
In-reply-to
Content
> What else can I do? Since I'm only dealing with integer powers, should I 
> try using my own ipow(y, n) for testing?

I'd expect that a square-and-multiply-style pow would be less accurate than math.pow, in general, simply because of the number of floating-point operations involved.

But I don't think there's a real problem here so long as you don't have an expectation of getting super-accurate (e.g., correctly rounded or faithfully rounded) results; testing that results are accurate to within 10 ulps or so is probably good enough.

If you want an actual correctly-rounded nth root just for testing purposes, it's certainly possible to construct one with integer arithmetic, but an easier alternative might simply be to use MPFR's "mpfr_root" function (as wrapped by gmpy2) to generate test values.
History
Date User Action Args
2016-08-14 12:05:37mark.dickinsonsetrecipients: + mark.dickinson, tim.peters, rhettinger, steven.daprano, martin.panter
2016-08-14 12:05:37mark.dickinsonsetmessageid: <1471176337.54.0.863617639651.issue27761@psf.upfronthosting.co.za>
2016-08-14 12:05:37mark.dickinsonlinkissue27761 messages
2016-08-14 12:05:37mark.dickinsoncreate