-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtip_calculator.mmt
139 lines (139 loc) · 5.14 KB
/
tip_calculator.mmt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
<?xml version='1.0' encoding='UTF-8' standalone='yes' ?>
<micromath xmlns:mmt="http://micromath.mkulesh.com">
<formulaList documentVersion="2" author="" title="" description="" textWidth="60" significantDigits="5" scale="0.47457" redefineAllowed="false">
<text_fragment>
<term key="text" text="Tip Calculator. License: GPL 3.0." />
</text_fragment>
<equation>
<term key="leftTerm" text="bill" />
<term key="rightTerm" text="111.00" />
</equation>
<equation>
<term key="leftTerm" text="tax" />
<term key="rightTerm" text="10" />
</equation>
<text_fragment inRightOfPrevious="true">
<term key="text" text="%;" />
</text_fragment>
<result inRightOfPrevious="true" disableCalculation="false" hideResultField="false" arrayLength="7">
<term key="leftTerm" text="taxAmount" />
<term key="rightTerm" text="" />
</result>
<result disableCalculation="false" hideResultField="false" arrayLength="7">
<term key="leftTerm" text="billAfterTax" />
<term key="rightTerm" text="" />
</result>
<equation>
<term key="leftTerm" text="tip" />
<term key="rightTerm" text="15" />
</equation>
<text_fragment inRightOfPrevious="true">
<term key="text" text="%" />
</text_fragment>
<result disableCalculation="false" hideResultField="false" arrayLength="7">
<term key="leftTerm" text="tipBeforeTax" />
<term key="rightTerm" text="" />
</result>
<result inRightOfPrevious="true" disableCalculation="false" hideResultField="false" arrayLength="7">
<term key="leftTerm" text="tipAfterTax" />
<term key="rightTerm" text="" />
</result>
<result disableCalculation="false" hideResultField="false" arrayLength="7">
<term key="leftTerm" text="totalBTIP" />
<term key="rightTerm" text="" />
</result>
<result inRightOfPrevious="true" disableCalculation="false" hideResultField="false" arrayLength="7">
<term key="leftTerm" text="totalAtip" />
<term key="rightTerm" text="" />
</result>
<equation>
<term key="leftTerm" text="people" />
<term key="rightTerm" text="3" />
</equation>
<result disableCalculation="false" hideResultField="false" arrayLength="7">
<term key="leftTerm" text="pplBTIP" />
<term key="rightTerm" text="" />
</result>
<result inRightOfPrevious="true" disableCalculation="false" hideResultField="false" arrayLength="7">
<term key="leftTerm" text="pplATIP" />
<term key="rightTerm" text="" />
</result>
<text_fragment>
<term key="text" text="" />
</text_fragment>
<text_fragment>
<term key="text" text="Logic —" />
</text_fragment>
<equation>
<term key="leftTerm" text="pplBTIP" />
<term key="rightTerm" code="divide_slash">
<term key="leftTerm" text="totalBTIP" />
<term key="rightTerm" text="people" />
</term>
</equation>
<equation>
<term key="leftTerm" text="pplATIP" />
<term key="rightTerm" code="divide_slash">
<term key="leftTerm" text="totalAtip" />
<term key="rightTerm" text="people" />
</term>
</equation>
<text_fragment>
<term key="text" text="" />
</text_fragment>
<equation>
<term key="leftTerm" text="totalBTIP" />
<term key="rightTerm" code="plus">
<term key="leftTerm" text="billAfterTax" />
<term key="rightTerm" text="tipBeforeTax" />
</term>
</equation>
<equation>
<term key="leftTerm" text="totalAtip" />
<term key="rightTerm" code="plus">
<term key="leftTerm" text="billAfterTax" />
<term key="rightTerm" text="tipAfterTax" />
</term>
</equation>
<text_fragment>
<term key="text" text=" This tip is calculated from the subtotal:" />
</text_fragment>
<equation>
<term key="leftTerm" text="tipBeforeTax" />
<term key="rightTerm" code="perc">
<term key="argTerm1" text="bill" />
<term key="argTerm2" text="tip" />
</term>
</equation>
<text_fragment>
<term key="text" text=" Tip calculated from bill+tax:" />
</text_fragment>
<equation>
<term key="leftTerm" text="tipAfterTax" />
<term key="rightTerm" code="perc">
<term key="argTerm1" text="billAfterTax" />
<term key="argTerm2" text="tip" />
</term>
</equation>
<text_fragment>
<term key="text" text="" />
</text_fragment>
<equation>
<term key="leftTerm" text="taxAmount" />
<term key="rightTerm" code="perc">
<term key="argTerm1" text="bill" />
<term key="argTerm2" text="tax" />
</term>
</equation>
<equation>
<term key="leftTerm" text="billAfterTax" />
<term key="rightTerm" code="plus">
<term key="leftTerm" text="bill" />
<term key="rightTerm" text="taxAmount" />
</term>
</equation>
<text_fragment>
<term key="text" text=" Author: JuneYourTech https://github.com/juneyourtech/varia" />
</text_fragment>
</formulaList>
</micromath>