Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
What is it - an error or?
Prime does not use static unit check (SUC) anymore - fortunately.
So there is a difference between 0 and 0 m (not always, but it may matter here and there).
This was also the reason why "zero" and "Zero" were introduced in Prime - you may want to look up further details about them in the docs.
I'd say: this is what Prime should do.
You are comparing (because that's what the '=' symbol is for) two items, If one has a unit, and the other hasn't, then either they're NEVER the same, or an error is flagged.
Prime makes a good choice here: flag the error, beause thë other option (they're never the same) is apparently not what the user meant.
Success!
Luc
Luc, I guess the explanation is not that simple as we are not dealing with a calculation like 3 + 5m= but rather 0 + 5m= (which Prime happily simplifies to 5m, BTW).
For Prime quite often 0 m equals exactly the dimensionless number 0 and ever so often its also the other way round. But because Prime does not use SUC it cannot always detect the correct unit which should be applied and this is the point were the special new unit Zero comes into play.
Its a bit inconsistent that Prime accepts the 0's without units which Valery had underlined in red on the LHS of the picture. We may be able to find out why those 0's are no problem for Prime while other 0's at other positions are. But I guess its better to get used to applying the correct units to every 0 which denotes a physical quantity.
The use of "Zero" as shown in the picture I posted is nothing I would propagate.
"For Prime quite often 0 m equals exactly the dimensionless number 0".
0 m does not equal 0, so wherever Prime allows that (and I think that Mathcad is no better),
it is making a mistake. It may be convenient for the user, and that might be the reason why it allows it every now and then, but I think it can lead to serious trouble.
Example 2 m - 2 m = 0 m, 2 kg - 2 kg = 0 kg.
If 0 m = 0 and 0 kg = 0, then kg would be m.
Luc
@LucMeekes wrote:
"For Prime quite often 0 m equals exactly the dimensionless number 0".
0 m does not equal 0,
Correct, that was my point. 0 m is a physical quantity but 0 is just a number.
so wherever Prime allows that (and I think that Mathcad is no better),
it is making a mistake. It may be convenient for the user
Prime seems to be worse as it looks arbitrary to the user when Prime sometimes would allow a dimensionless 0 and sometimes not. Guess that was the main point of Valery's question.
In Mathcad with its SUC dimensionless 0's are allowed throughout. Which may be wrong from a purists view but sure is convenient.
Prime which fortunately does not use SUC and therefore cannot guess the correct unit a dimensionless should have, should IMHO throw an error even when its able tu guess the correct unit. This for consistency and to avoid confusion.
If 0 m = 0 and 0 kg = 0, then kg would be m.
No, thats not a valid conclusion, I think.
If 0 m = 0 and 0 kg = 0 then you may just conclude that m and kg are not units at all.
As you know units are simply treated as constant factors in Mathcad and Prime and given that 0 x = 0 and 0 y = 0 does not allow you to conclude that x=y.
I agree with you.
"given that 0 x = 0 and 0 y = 0 does not allow you to conclude that x=y."
You're perfectly right. I stand corrected. The only valid conclusions from this are:
- x and y are not units.
- x and y must be scalar.
- x can be different from y.
Going further, suppose: 0 x = 0 y. From this one can say:
if x is (or has) a unit, then y is (or must have) the same unit.
You cannot lose units in an expression, except by 'dividing them out'. This, surprisingly, may require 'multiplication' in certain circumstances....
Instead of as 'constant factors', units should be treated as symbols by Prime and Mathcad.
Luc