-
Notifications
You must be signed in to change notification settings - Fork 1
/
readme.txt
83 lines (42 loc) · 2.12 KB
/
readme.txt
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
# This is a simple GUI calculator made in Qt Creator 5 using the ExprTk library (C++ Mathematical Expression Library) found here: http://www.partow.net/programming/exprtk/index.html
It can be compiled in Qt Creator using qmake.
# Basic instructions:
Use the keypad to type in a valid math expression and push "=" to evaluate it.
(+/-) is to change signs from pos to neg, press again to go back to pos.
pi value is derived from library math.h M_PI but ExprTk truncates it to 5 decimal places which is good enough for testing.
For unary operators please put "(" and ")" around the operand except of ^2 which is square and used like:
2^2 which evaluates to 4.
Examples below are taken from official Github repo of ExprTk at
https://github.com/ArashPartow/exprtk/blob/master/readme.txt
| abs | Absolute value of x. (eg: abs(x))
| avg | Average of all the inputs.|
|| (eg: avg(x,y,z,w,u,v) == (x + y + z + w + u + v) / 6) |
| log | natural log of x
| logn | Base N logarithm of x. where n is a positive integer.
|| (eg: logn(x,8))|
| exp | e to the power of x. (eg: exp(x))
| mul| Product of all the inputs.|
|| (eg: mul(x,y,z,w,u,v,t) == (x * y * z * w * u * v * t)) |
| pow | x to the power of y. (eg: pow(x,y) == x ^ y)
| sqrt | Square root of x, where x >= 0. (eg: sqrt(x)) |
Trigonometry functions:
All are evaluated in radians.
| acos | Arc cosine of x expressed in radians. Interval [-1,+1] |
|| (eg: acos(x))
| asin | Arc sine of x expressed in radians. Interval [-1,+1] |
|| (eg: asin(x))
| atan | Arc tangent of x expressed in radians. Interval [-1,+1] |
|| (eg: atan(x)) |
| atan2 | Arc tangent of (x / y) expressed in radians. [-pi,+pi] |
|| eg: atan2(x,y)
| cos | Cosine of x. (eg: cos(x))
| sin | Sine of x. (eg: sin(x))
| tan | Tangent of x. (eg: tan(x))
To convert between radians and degrees.
| deg2rad | Convert x from degrees to radians. (eg: deg2rad(x)) |
| rad2deg | Convert x from radians to degrees. (eg: rad2deg(x)) |
Remaining Issues:
Ability to save answers to memory so operations can be performed on them.
Better button layout.
Ability to switch layout from basic to scientific.
Blinking cursor.