%mathpiper
unitComparisonConversions := [(a_ ~ u_) <? (b_ ~ v_) <- ValueOf(a ~ u # v) <? b,
(a_ ~ u_) <=? (b_ ~ v_) <- ValueOf(a ~ u # v) <=? b,
(a_ ~ u_) =? (b_ ~ v_) <- ValueOf(a ~ u # v) =? b,
(a_ ~ u_) >=? (b_ ~ v_) <- ValueOf(a ~ u # v) >=? b,
(a_ ~ u_) >? (b_ ~ v_) <- ValueOf(a ~ u # v) >? b];
aFoot := 1~ft;
almostAFoot := 11~inch;
anotherFoot := 12~inch;
Verify(1~ft >? 11~inch /:: unitComparisonConversions, True);
Verify(aFoot >? almostAFoot /:: unitComparisonConversions, True);
Verify(1~ft <? 11~inch /:: unitComparisonConversions, False);
Verify(aFoot <? anotherFoot /:: unitComparisonConversions, False);
Verify(1~ft >=? 11~inch /:: unitComparisonConversions, True); //Not?(False) weird fail
Verify(aFoot >=? almostAFoot /:: unitComparisonConversions, True);
Verify(1~ft =? 11~inch /:: unitComparisonConversions, False);
Verify(aFoot =? almostAFoot /:: unitComparisonConversions, False);
Verify(1~ft =? 12~inch /:: unitComparisonConversions, True); // Fails!
Verify(aFoot =? anotherFoot /:: unitComparisonConversions, True);
Verify(` '(@aFoot =? @anotherFoot) /:: unitComparisonConversions, True); // Passes!
%/mathpiper
%output,mpversion=".267",preserve="false"
Result: True
Side Effects:
******************
File: LOADSCRIPT_EVALUATE_USER, Line: 16
1~ft >=? 11~inch /:: unitComparisonConversions
evaluates to
Not?(False)
which differs from
True
******************
******************
File: LOADSCRIPT_EVALUATE_USER, Line: 17
aFoot >=? almostAFoot /:: unitComparisonConversions
evaluates to
Not?(False)
which differs from
True
******************
******************
File: LOADSCRIPT_EVALUATE_USER, Line: 22
1~ft =? 12~inch /:: unitComparisonConversions
evaluates to
False
which differs from
True
******************
******************
File: LOADSCRIPT_EVALUATE_USER, Line: 23
aFoot =? anotherFoot /:: unitComparisonConversions
evaluates to
False
which differs from
True
******************
. %/output
--
You received this message because you are subscribed to the Google Groups "mathpiper-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to mathpiper-de...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--