Community Tip - Have a PTC product question you need answered fast? Chances are someone has asked it before. Learn about the community search. X
Can anybody throw some light on the problem below when using min?
"System Error. Entry point was not found."
I tried rearranging the definitions of pred and pushing min further down the functional chain, but to no avail. Indeed, using IsFunction caused Mathcad to bang out.
max doesn't have this issue. Nor do any of my redefinitions of min.
The problem occurs in both Mathcad Express 10 and Mathcad Express 11, even when only the definition of pred and the evaluation are present. pred has a counterpart function, succ, and that too shows the problem.
Mathcad Express 10 worksheet attached and Exception log file attached.
Stuart
Using the full version of Prime 11 I experience the same error message but Prime does not crash with an exception error.
Obviously the output of "min" with an array of characters as argument is kind of an invalid object and not seen as a string even though it looks like an ordinary string.
All string operations like 'strlen', 'concat' or 'substr' fail with the same error ('System error - entry point not found')..
Looks like you found a bug in the implementation of the built-in "min" function.
EDIT: Its definitely a bug as the error also occurs if the argument of "min" is not a vector of strings but also if its a list of strings and the help clearly states that strings are allowed arguments for the "min" function.
The bug is already present in Prime Express 4 (oldest version I have installed) but it works as expected in Mathcad 15.
EDIT: Up to version Prime 9 an inline evaluation could be used as a workaround. In Prime 10 the undocumented trick to convert a range into a vector was broken on purpose by PTC and this workaround for the "min" bug does not work anymore, too.
Prime 9:
Interesting, Werner.
Mathcad Express 10 still crashes when I apply IsFunction to the (apparent) character. Note the yellow half-circle indicating calculation going on; it took a couple of seconds before it threw a tantrum.
IsArray and IsNaN seem to work fine, but SIUnitsOf has an interesting error message.
Stuart
Sorry, I guess I didn't read your post carefully enough and didn't notice the reference to "IsFunction."
"IsFunction" also results in a Prime crash with an exception error for me.
The same thing happens in Prime Express 4 (without the inline evaluation workaround). But Prime 4 simply shuts down without any error message at all.
But anyway, it's a bug in Prime's implementation of the “min” function.
Maybe there's a kind soul here in the forum who will report this bug officially so it can (hopefully) be fixed.
Unfortunately, I am not entitled to do that (not to mention the barriers involved in creating a case).
Note that there's a distinct difference between the functions min and max:
(apart from the fact that you cannot use that function Invoke1).
In order to show that 'min' is Invoke1, I have to explicitly set the label of min to a function. When I don't, I get this:
min is an undefined type here, labelled as '-', and the s is a unit.
I suspect, due to the fact that min could be a function, as well as a unit (60 s), Prime gets into a limbo.
I'm happy with calling that a bug.
Further:
But surprisingly:
Success!
Luc
Hi @StuartBruff,
I wanted to see if you got the help you needed.
If so, please mark the appropriate reply as the Accepted Solution. It will help other members who may have the same question.
Thanks,
Anurag
Hi Anurag,
I suppose it is clear for you to see, from the very start of this thread, that there's something unusual going on. I think it's safe to say that the participants in the thread understand/conclude that there's a bug in Prime, concerning the implementation of the min() function.
Knowing that neither Stuart, nor Werner, nor myself are entitled to report bugs, the better contribution from you would be that you forward(ed) this to the development team for investigation.
Success!
Luc
@anursingh wrote:
Hi @StuartBruff,
I wanted to see if you got the help you needed.
Tricky question, Anurag.
In a way, I did, because both Werner and Luc confirmed that min is not behaving correctly. OTOH, I didn't get the help I needed because the bug hasn't been fixed. Consequently, accepting either Werner's or Luc's confirmation might give the erroneous impression that the min bug wasn't real or had been fixed. So, I think I'll leave the question Open.
See Luc's response to your question - it says it all better than I could.
Stuart
