You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32-14Lines changed: 32 additions & 14 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -23,27 +23,39 @@ We start from an imitation of Mathematica. We try to make it more connected to C
23
23
24
24
*`NMath` module offers better performance on numerical tasks. Numerical linear algebra will be strongly supported. It is under developing. We have already implemented `Assembler`. `MathObejct` can be converted to `NFunction` which takes the variables in the expression as parameters. This would support those cases like plotting, numerical integrating when massive computing is needed.
25
25
26
-
* Convert `MathObject` to LaTex format string.
26
+
* Convert `MathObject` to **LaTex** format string.
* As an C++ library, you can enjoy its features in C++ freely. We use lambda expression to convert `MathObject` to `std::function` so that you can use it freely in your program.
29
43
30
44
```C++
31
45
Assembler assembler;
32
46
auto f = assembler.assemble(Parse("Sin(x^2)-y/2"),{"x","y"});
33
47
std::cout << f({1.2, 1.3}) << std::endl;
34
-
/*
35
-
Output:
36
-
0.3414583
37
-
*/
48
+
49
+
/******Output*******
50
+
0.3414583
51
+
*******************/
38
52
```
39
53
40
54
41
55
42
-
43
-
44
56
## A powerful calculator in 9 line
45
57
46
-
The follow program with **mathS** is a calculatorthat supports various and vector and matrix.
58
+
The simplest application with **mathS** is a calculator. The follow program is a calculator that supports various operations, vector and matrix.
47
59
48
60
```c++
49
61
#include <iostream>
@@ -65,7 +77,7 @@ int main() {
65
77
std::vector<std::string> params = {}; // No variables in the expression in a calculator program.
66
78
67
79
auto f = assembler.Assemble(mobj, params); // Get NFunction
0 commit comments