forked from sagebind/mathpad
-
Notifications
You must be signed in to change notification settings - Fork 2
/
test.qalc
362 lines (288 loc) · 3.5 KB
/
test.qalc
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
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
round(1.5, 1)
round(1.5, 0)
atan2(3, -3) /pi
pi
e
sqrt(16)
root2(16)
root(2,16)
sqrt(-4)
pow([[-1, 2], [3, 1]], 2)
derivative('x^2 + x', 'x')
12 / (2.3 + 0.7)
12.7 cm to inch
sin(45 deg) ^ 2
9 / 3 + 2i
det([-1, 2; 3, 1])
2x + 3x
simplify('3 + 2 / 4')
derivative('2x^2 + 3x + 4', 'x')
30USD in EUR
f= 3
3*f
test1 = 2
fraction(0.5)
fraction(1/3)
fibonacci(7)
j=[1,2,3]
j*2
1m + 2cm
1minute + 1 hour
10 cm to m
60 miles/hour * 30 minutes
100 USD / 1 hour in USD / minute
last
1 USD in USD
1 USD
1USD
1 USD in EUR
1 EUR
1EUR
$1
$1
$1 + $5
$1+$5
$1USD
$1 USD
$1 EUR
$10 USD
$10.0 USD
$100.00 USD
$1,000 USD
$1,000,000 USD
1,000,000
date(1/3/56 10:10 PM)
1 plus 2
5 mod 3
20% * 100
12pt in px
last
20 cm * 20 cm
test = today - 8 days
test + 7 minutes // comment
# Header
f(x) = 2 + x
f(7)
variable = 6
($100 / 4 days) * 300 days
$400 /sqft * 3500 sqft
400 * 3500
50% off of 100
50% off of 10.0
50% off of $100
50% off of $10.0
50% off of $1,000
50% off of $100USD
50% off of $100 USD
50% off of 100 USD
50% off 100
50% off 10.0
50% off $100
50% off $10.0
50% off $1,000
50% off $100USD
50% off $100 USD
50% off 100 USD
5^2
sqrt(16)
cbrt(8)
abs(-4)
log(10)
ln(3)
fact(5)
5!
ceil(3.76)
floor(3.76)
sin(45 deg)
sin(45 rad)
cos(3.45)
tan(8) // these assume rad
date("1/2/2021")
date(1/2/2021)
epoch(1615789316)
date(1615789316)
epoch(1615789316000)
date(1615789316000)
yesterday
tomorrow
today
now
now - 1 hour
today - 2 days
2 days ago
today - date(1/2/2021) in days
tomorrow - yesterday
tomorrow - yesterday in hours
2021-1-30
12-30-2021
1/30/2021
2021/12/30
1/30/2021 1:10
1/30/2021 1:10:45
1/30/2021 10:10 AM
1/30/2021 19:10
1/30/2021 19:10 PST
1/30/2021 10:10 PM UTC
6/11/2010 - 6/11/2008 in days
1 year in months
1 month in weeks
1 week in days
1 day in hours
60 miles / hour * 5 hours in mi
1 year ago
2 months ago
1 week ago
5 days ago
1 hour ago
30 minutes ago
1 second ago
5 ^ 2
1 & 1
1 | 1
1 xor 1
1 or 1
2 << 1
2 >> 1
5 mod 3
32 fahrenheit to celsius
100 fahrenheit to kelvin
100 oF
100 f
100oF to oC
100f to c
100 oF to oC
100 f to c
100 degF to degC
0K to degF
12ml in teaspoons
12ml in tablespoons
100 miles/hour in km/hour
100 mph in kph
1 == 1
1 != 1
random()
range(0,10,3)
range(0,10)
0:10
0:2:10
max(1,2,3)
min(1,2,3)
obj={a:1}
obj.a
[1; 2]
[1,2,3] + [1,2,3]
[1,2,3] - [1,2,3]
[1,2,3] * [1,2,3]
[1,2,3] .* [1,2,3]
[1,2,3] / [1,2,3]
[1,2,3] ./ [1,2,3]
5 mod 3
5 % 3
5% 3
5%3
5 ^ 3
[1,2,3] .^ [1,2,3]
15 > 100 ? 1 : 2
3!
matrix = [9,7,8]
matrix[2]
log(4)
log(100,4)
ln(4)
1.4e3
1.4e-3
1e309
-1e309
Infinity
phi
tau
speedOfLight
gravitationConstant
planckConstant
reducedPlanckConstant
// tons more contants in mathjs
text = concat("hello", " world")
size(text)
text[4:9]
text[1] = "H"
text[7:12] = "There!"
text
zeros(5)
ones(5)
simplify('x^2 + x + 3 + x^2')
derivative('2x^2 + 3x + 4', 'x')
help(derivative)
sign(546)
sign(-456)
distance([1,1],[2,2])
combinations(10, 1)
permutations(10)
random(1,2)
isPrime(7)
50 tps / 5 days
1
3
7
total
6
4
9
avg
1
2
3
4
average
sum
0b11
0o77
0xff
bin(0b11)
bin(0o77)
bin(0xff)
hex(0b11)
hex(0o77)
hex(0xff)
oct(0b11)
oct(0o77)
oct(0xff)
bin(hex(oct(0b11)))
12 em
240px in em
100 em in points
1 em
em
1 em in px
1 em in points
1 em in m
20px in em
ppi
dpi
1 inch in pixels
12 point in px
1 em in px
1 em in points
em = 20px
1 em in points
1 inch in px = 96 px
//ppi = 326
1 cm in px = 128,35 px
1 inch in cm
cm
cm = 3 in
1 inch in cm
(1 px/in) * 30 in in px
cm
mi
mi = 7
mi
12pt in px
mi =
speedOfLight =
round =
USD =
px =
today =
last =
$1 + $5
1 USD + 5 USD