8
$\begingroup$

Bug introduced in 9.0 or earlier and fixed in 10.4


The following code using PiecewiseExpandand Modgives the wrong answer

PiecewiseExpand[Mod[n, m], m > 0, Integers] 

0

tested in Mathematica v 10.2.0 Windows 7 64 and partially discussed on early version of this question.

Wolfram Technical Support case identification : [CASE:3442254]

Can anybody reproduce this problem in other systems?

$\endgroup$
4
  • 1
    $\begingroup$ V9.0.1 on Win32 shows the same result $\endgroup$ Oct 9, 2015 at 16:01
  • 1
    $\begingroup$ V10.0.2, Mac OS X 10.10.5 shows the same problem. $\endgroup$
    – march
    Oct 9, 2015 at 16:07
  • 1
    $\begingroup$ Problem is repeatable on Mac OS X 10.11 with Mathematica version 10.2 $\endgroup$
    – Bob Hanlon
    Oct 9, 2015 at 16:35
  • 2
    $\begingroup$ With v 10.2, $Assumptions = m > 0 && Element[{n, m}, Integers]; PiecewiseExpand[Mod[n, m]] returns Mod[n, m] $\endgroup$
    – Bob Hanlon
    Oct 9, 2015 at 16:39

1 Answer 1

3
$\begingroup$

As indicated in the header, this bug has been fixed as of Mathematica 10.4.0:

$Version                                                                

(* 10.4.0 for Linux x86 (64-bit) (February 26, 2016) *)

PiecewiseExpand[Mod[n, m], m > 0, Integers]                             

(* Mod[n, m] *)
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.