Skip to content

Commit 895734f

Browse files
Update README.md
1 parent 48d0f14 commit 895734f

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -45,24 +45,24 @@ result = f(2.5) # Numerically evaluate at x = 2.5
4545

4646
# Use the .n attribute to access fast numerical methods
4747
numerical_roots = f.n.all_roots()
48-
# or call f's n-prefixed methods directly to use variable precision numerical methods
49-
roots = f.nsolve_all()
48+
# Call f's n-prefixed methods to use variable precision numerical methods
49+
precise_roots = f.nsolve_all(prec=50) # 50 digits of accuracy
5050

51-
# Beautiful printing options
52-
f.print() # quick and easy printing
51+
# quick and easy printing
52+
f.print()
5353
f.print('latex')
5454
f.print('mathematica_code')
5555
# or
5656
print(f.print.latex()) # LaTeX output
57-
print(f.print.ccode()) # Pretty ASCII art
57+
print(f.print.ccode()) # c code output
5858
```
5959

6060

61-
## 🎯 Numerical Computing
61+
## 🎯 Numerical Computing
6262

6363
FunKit excels at bridging symbolic and numerical mathematics:
6464
```python
65-
f = Expression("x^3 - 2*x^2 + x - 1")
65+
f = Expression("x^3 - 2x^2 + x - 1")
6666

6767
# Root finding
6868
all_roots = f.n.all_roots(bounds=(-5, 5))
@@ -105,13 +105,13 @@ expr = Expression("2x^2 + ln(|x-1|)")
105105
from sympy import sin, cos
106106
expr = Expression(sin(x) + cos(x))
107107

108-
# Numerical methods via .n attribute
109-
roots = expr.n.all_roots(bounds=(-10, 10))
110-
integral = expr.n.quad(0, 1) # Numerical integration
111-
112108
# Symbolic operations
113109
derivative = expr.diff(x)
114110
expanded = expr.expand()
111+
112+
# Numerical methods via .n attribute
113+
roots = expr.n.all_roots(bounds=(-10, 10))
114+
integral = expr.n.quad(0, 1) # Numerical integration
115115
```
116116

117117

0 commit comments

Comments
 (0)