Skip to content

Commit 83fb133

Browse files
committed
Numerical integrator docs update
1 parent 6dc54f6 commit 83fb133

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

README.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,5 @@ Functions list (see in-code documentation for more detail)
7272
| `Quad` | Po-Shen quadratic solver |
7373
| `PSet` | Powerset of a list |
7474
| `FFTConvolve` | Rank-polymorphic convolution using fast fourier transform |
75+
| `Ode‼` | Numerical integrator |
76+
| `Ode‼!` | More configurable version of `Ode‼` |

lib.ua

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -520,6 +520,15 @@ OdeImpl‼ ↚ (
520520
#
521521
# The first of the three functions can be used to set optional arguments, namely ε, the error bound for the integration.
522522
# The remaining two functions correspond to those of `Ode‼`.
523+
#
524+
# Example: Changing simulation precision
525+
# This sets the simulation precision threshold to a larger value (meaning less precision, with a cheaper simulation).
526+
# ```uiua
527+
# g ← 9.81 # Gravity
528+
# L ← 1 # Pendulum length
529+
# μ ← 0.5 # Damping coefficient
530+
# Ode‼!(°⊸ε1e¯3|⋅⊃[⊣|¯+˜∩×g μ÷L∿°⊟]|<10) 0 [0 12]
531+
# ```
523532
Ode‼! ← OdeImpl‼^1^2 OdeConfig!(^0($"_New"˜▽@⊙-1⊢⋅⊢)^!^0)
524533
# Numerical integrator
525534
#

0 commit comments

Comments
 (0)