14
$\begingroup$

Bug introduced in 10.1.0 and fixed in 10.2.0


Some problem in v10.1.0 (Windows 8.1 x64) and the new MinMax...

MinMax[{0.2`, 0.375`, 0.55`, 0.7250000000000001`, 0.9000000000000001`,
   1.`, 0.2`, 0.9`, 1}]

{0.2, 1.}

Now

Needs["NDSolve`FEM`"]
MinMax[{0.2`, 0.375`, 0.55`, 0.7250000000000001`, 0.9000000000000001`,
   1.`, 0.2`, 0.9`, 1}]

MinMax[{0.2, 0.375, 0.55, 0.725, 0.9, 1., 0.2, 0.9, 1}]

This happens because NDSolve FEM MinMax shadows the newly added System MinMax and because NDSolve FEM MinMax doesn't supports mixed Integer and Real arguments.

Of course, it's better to be specific always:

System`MinMax[{0.2`, 0.375`, 0.55`, 0.7250000000000001`, 
  0.9000000000000001`, 1.`, 0.2`, 0.9`, 1}]

{0.2, 1.}

UPDATE

Hello,

Thank you for contacting Wolfram Technical Support. The mentioned conflict is a known issue and our developers are aware of it. I have added your contact information to the existing report so you can be notified when this is resolved. Thank you once again for taking the time and bringing this to our attention. Sincerely,

[...]

Wolfram Technical Support Wolfram Research http://www.wolfram.com/support/

$\endgroup$
9
  • 5
    $\begingroup$ The "bug" is that there is no shadowing warning when the NDSolve`FEM package is loaded. Then the user would know to use the full name. $\endgroup$
    – Bob Hanlon
    Commented Apr 14, 2015 at 14:43
  • 1
    $\begingroup$ I hope we can do better in some near future instead of prepending System`` to every MinMax call. $\endgroup$
    – unlikely
    Commented Apr 14, 2015 at 15:16
  • $\begingroup$ Have you reported this? $\endgroup$
    – Kuba
    Commented Apr 15, 2015 at 7:16
  • 2
    $\begingroup$ As a more convenient workaround, you could put NDSolve`FEM` after System` in $ContextPath. For example Needs["NDSolve`FEM`"]; $ContextPath = RotateLeft[$ContextPath] is an easy way. Of course it gives the FEM functions the lowest priority, but maybe that's ok. $\endgroup$
    – Michael E2
    Commented Apr 15, 2015 at 13:49
  • 5
    $\begingroup$ This is a bug and fixed in the development version. Thanks. $\endgroup$
    – user21
    Commented May 6, 2015 at 19:56

1 Answer 1

7
$\begingroup$

As mentioned by user21 in the comments, this is now fixed in version 10.2.

In[1]:= MinMax[{0.2`, 0.375`, 0.55`, 0.7250000000000001`, 0.9000000000000001`, 
                1.`, 0.2`, 0.9`, 1}]    

Out[1]= {0.2, 1.}

In[2]:= Needs["NDSolve`FEM`"]

In[3]:= MinMax[{0.2`, 0.375`, 0.55`, 0.7250000000000001`, 0.9000000000000001`, 
                1.`, 0.2`, 0.9`, 1}]

Out[3]= {0.2, 1.}
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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