[issue3724] math.log(x, 10) gives different result than math.log10(x)

2009-09-01 Thread Terry J. Reedy
Terry J. Reedy added the comment: The docs were patched in r74617 to (re)close #6765. This included something similar to the OP's math_doc.patch. -- nosy: +tjreedy ___ Python tracker ___

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-12-05 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: I'm closing this, for reasons already given. For the proposal to add log2, see issue 3366. -- status: open -> closed ___ Python tracker <[EMAIL PROTECTED]> _

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-10-14 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: About the number of bits: I prefer an the implementation in int/long types proposed in issue #3439. ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-10-14 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: Note that log2(int) -> float wouldn't entirely replace numbits, due to loss of precision in the result. e.g. log2(2**100), log2(2**100+1) and log2(2**100-1) would likely all return exactly the same result (100.0), where numbits wants results

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-10-10 Thread STINNER Victor
STINNER Victor <[EMAIL PROTECTED]> added the comment: About large integers which can not be converted to float (too big!): it would be nice if math.log2() and/or math.log10() works which such numbers. But it would better if you know if the functions used the FPU or not (only integers). Idea:

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-10-09 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: +1 on a log2 function, especially one that has been generalized to work with long integers. It would help with the "numbits" problem that comes-up all the time. ___ Python tracker <[EMAIL PROTECTED]>

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-10-09 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: > Mark, is some of the inaccuracy due to double rounding? No, I don't think so; at least, not in the sense of rounding the same value twice (with different precisions). I get similar results on my Core 2 Duo machine, which should be immun

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-10-05 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Mark, is some of the inaccuracy due to double rounding? Could we make the two argument form more accurate by allowing the compiler to generate code that uses full internal precision, log(n)/log(d), instead of prematurely forcing the interm

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-09-03 Thread Raymond Hettinger
Changes by Raymond Hettinger <[EMAIL PROTECTED]>: -- assignee: marketdickinson -> rhettinger ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-09-03 Thread Florian Mayer
Florian Mayer <[EMAIL PROTECTED]> added the comment: Uploaded small documentation patch warning the user of math.log(x, 10) inaccuracy. Added file: http://bugs.python.org/file11362/math_doc.patch ___ Python tracker <[EMAIL PROTECTED]>

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-09-03 Thread Raymond Hettinger
Raymond Hettinger <[EMAIL PROTECTED]> added the comment: Mark, thanks for the first review comments. Am also disturbed by the lack of generality and don't think it wise to introduce a discontinuity. Am rejecting this patch. Leaving the bug report open in case other solutions arise. --

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-09-03 Thread Mark Dickinson
Mark Dickinson <[EMAIL PROTECTED]> added the comment: I can't really see a compelling reason to make this change---it seems like an unnecessary complication to add to what's currently a simple function. Someone who really needs the accuracy can just use log10. Perhaps a note in the documentatio

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-08-30 Thread Georg Brandl
Changes by Georg Brandl <[EMAIL PROTECTED]>: -- assignee: -> marketdickinson nosy: +marketdickinson ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-08-29 Thread Florian Mayer
Changes by Florian Mayer <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file11310/log.patch ___ Python tracker <[EMAIL PROTECTED]> ___

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-08-29 Thread Florian Mayer
Changes by Florian Mayer <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file11302/log.patch ___ Python tracker <[EMAIL PROTECTED]> ___ __

[issue3724] math.log(x, 10) gives different result than math.log10(x)

2008-08-29 Thread Florian Mayer
New submission from Florian Mayer <[EMAIL PROTECTED]>: I have found out that the result of math.log(x, 10) is slightly more inaccurate than the one of math.log10(x). Probably the best example is math.log(1000, 10) and math.log10(1000). I have attached a patch that forces math.log to internally us