Community Tip - Did you get an answer that solved your problem? Please mark it as an Accepted Solution so others with the same problem can find the answer easily. X
MathCAD Prime 7.0 is where my company is still stuck at, but it still has the very frustrating limitation/bug of not accepting decimal numbers without putting a leading zero before the decimal. It allows you to do this when calculating a number, but not when using units. Has this been fixed in subsequent versions?
It is frustrating not only from the standpoint that I never put leading zeros before a decimal, and never have, never do on any other program/software, and it's not a problem at any other time on any other software package I use (including MathCAD Prime 7.0) UNTIL I try to use units in the calculation. I have hundreds of worksheets where I have not used leading zeros and it used to calculate everything just fine, even with the use of units.
Maybe type an * (explicit multiplication) between the 2 and the i...
Success!
Luc
I can confirm that this behaviour has not changed in Prime 10.
As a workaround you may type an explicit multiplication (*) between the number and the unit as suggested by Luc or (for consistency) an implicit one which you get by pressing ctrl-shift-U.
BTW, Prime calls this implicit multiplication the "scaling operator".
@Werner_E wrote:
BTW, Prime calls this implicit multiplication the "scaling operator".
I've occasionally wondered why PTC called it the "scaling operator" or, to be more precise, why they gave it the functionality they did.
AFAICT, the "S-expression" associated with each maths region doesn't so much affect the nature of the calculation but rather the chosen display form. Certainly, the scaling operator scales scalars, but its prime(!) purpose seems to be to tell Mathcad not to draw a multiplication operator between terms that Mathcad is actually multiplying.
The Hadamard (element-by-element or vectorized) product would, IMO, have been a more mnemonic operation on arrays.
Stuart
The reason you can't type ".2in" is because the dot is a valid leading character in an identifier name.
When the number begins with 0, Mathcad Prime recognises a non-numerical character as the number string terminator (unless that character is an i or a j, in which case Mathcad interprets the number as imaginary).
Stuart
From the Mathcad Prime 10 Help:
A little more digging shows that the ISO 80000-1:2022 states:
If the magnitude (absolute value) of the numbers is less than 1, the decimal sign shall be preceded by a zero."
Earlier versions, including the British Standard 31, have similar wording, although the “shall” is replaced by “should” in some cases.
So, Mathcad’s behaviour in this respect would appear to be formally neither a limitation nor a bug but rather correct, irrespective of common practice.
Stuart
So, Mathcad’s behaviour in this respect would appear to be formally neither a limitation nor a bug but rather correct, irrespective of common practice.
I fully agree.
Accepting numbers starting with a decimal point is just a courtesy, as this habit seems to be common in some parts of the world, but it is certainly not a requirement.
The fact that you now have to insert the scaling operator manually in such cases is, in my opinion, a small price to pay for this concession.
I do not think it would be justified to restrict the possibility of using variable names with a leading dot followed by digits and others.
Where I live, we use the comma and not the period as a decimal separator, and omitting the zero before the comma is not usual (at least not nowadays). With a calculation like 50*,2, and especially with 50*.2, many people would probably get the result 100 because they would think the small decimal separator was either a typo or the legacy of a fly on the paper (or the monitor). With handwritten calculations, some would perhaps even get 600 because they would think the comma was a failed digit one.
So for me it is perfectly understandable and also reasonable that the standards support the writing of the leading zero in these cases with some emphasis.
But of course I understand that when you are used to use a certain short, you have the wish that the software you use should support it as well.