Solved
max( ) works and min( ) doesn't ?
- January 8, 2017
- 3 replies
- 3391 views
Hello, Everyone.
From :

So the question is : Is there a reason for : " max( ) works and min( ) doesn't " ?
Thanks in advance for your time and help.
Best Regards.
Ah, I did not realize that it depends on the first item in the vector.
Anyway, that behaviour sure is not as it should be and we may call it a bug.
But I am not sure how I would like min or max to behave. Normally in Mathcad, whenever a calculation encounters a NaN, it returns NaN as result. So for consistency min and max should return NaN in the examples above. On the other hand I guess it would not do any harm and would be convenient if those functions would simply ignore the NaN's - just like my filterNaN workaround.
Based on your information we can provide another workaround by simply putting + or - infinity at the front. But both workarounds will only work for vectors and must be modified slightly differently for row and column vectors.

Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.