[issue15107] Potential Bug in mpdecimal.c

2012-06-20 Thread Stefan Krah
Stefan Krah added the comment: Mark has already said it all. -- Ken, I want to add that in the case of _decimal it's pretty easy to test any suspected misbehavior against decimal.py. This would have shown very quickly that there is no bug. -- ___ Pyt

[issue15107] Potential Bug in mpdecimal.c

2012-06-19 Thread Mark Dickinson
Mark Dickinson added the comment: > That would probably be because exp(-infinity) is 0, which isn't a > floating-point special value, and ln(-infinity) is NaN, which is. Actually, looking at the code, mpd_setspecial is called under exactly the same circumstances (namely for +inf) in *both* cas

[issue15107] Potential Bug in mpdecimal.c

2012-06-19 Thread Mark Dickinson
Mark Dickinson added the comment: The code looks fine to me. > In the first few lines of this clone, the function mpd_qexp only calls > mpd_setspecial when mpd_isnegative is false while the function mpd_qln > calls mpd_setspecial independent of the value of mpd_isnegative. That would probabl

[issue15107] Potential Bug in mpdecimal.c

2012-06-19 Thread Ken Cheung
New submission from Ken Cheung : I observed a code clone from the following files. function : mpd_qexp @ (file: "Python-3.3.0a4/Modules/_decimal/libmpdec/mpdecimal.c", line: 4092)~4165 function : mpd_qln @ (file: "Python-3.3.0a4/Modules/_decimal/libmpdec/mpdecimal.c", line: 4525)~4612 In the