[New-bugs-announce] [issue15057] Potential Bugs in mpd_qdivint and mpd_qrem

Ken Cheung report at bugs.python.org
Wed Jun 13 19:42:39 CEST 2012

New submission from Ken Cheung <msrbugzilla at gmail.com>:

I observed a code clone from the following files.

function : mpd_qdivint @ (file: "Python-3.3.0a2/Modules/_decimal/libmpdec/mpdecimal.c", line: 3727)~3763
function : mpd_qrem @ (file: "Python-3.3.0a2/Modules/_decimal/libmpdec/mpdecimal.c", line: 6331)~6361

The function mpd_qdivint checks the condition "mpd_isinfinite(a) && mpd_isinfinite(b)" while mpd_qrem does not. I wonder if this is necessary in mpd_qrem. The source code is included in the attachment. Hope it helps.

components: Library (Lib)
files: mpdecimal_clone.txt
messages: 162717
nosy: Ken.Cheung
priority: normal
severity: normal
status: open
title: Potential Bugs in mpd_qdivint and mpd_qrem
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file25949/mpdecimal_clone.txt

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list