Skip to content

Commit

Permalink
Release 0.4.7: Numerical solver and integration
Browse files Browse the repository at this point in the history
New features
- `root` for numerical root finding (#36)
- `integrate` for numerical integration (#42), using Romberg algorithm
- Auto-simplification of `i*i` as -1 (#411)

Bug fixes:
- `LastArg` and `Undo` were not correct after comparisons (#402)
- Invalid equation created for symbolic comparisions, e.g `A=B` (#403)
- Converting `100!` to a based number would display `#00` (#405)
- Avoid crash if running out of memory processing fractions
- Possible memory corruption during negation of complex numbers (#406)
- Fix typo in `User` settings menu, rename it as `UI`
- `->Q` could give incorrect result for decimal32 and decimal64 (#409, #410)

Enhancements:
- Accelerated editor when `VariablesMenu` is shown (#404)
- Being able to pass equations containing equal sign to solver (e.g. `X+1=3`)
- Insert a single colon `:` inside text
- Sharing more code between plotter, solver and integrator
- Simulator uses the DB48X keyboard by default
- Label for constants menu changed to `CNST`

Signed-off-by: Christophe de Dinechin <christophe@dinechin.org>
  • Loading branch information
c3d committed Oct 15, 2023
1 parent 84b2c1b commit eb553d7
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 2 deletions.
5 changes: 5 additions & 0 deletions STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,11 @@
- [ ] Symbolic integration


### Numerical evaluation

- [X] Integration
- [X] Root finding

### Other RPL functional areas (to be expanded)

- [ ] Real-time clock
Expand Down
27 changes: 27 additions & 0 deletions doc/commands/numerics.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# Numerical functions

## ∫ (Integrate)

Perform a numerical integration of a function for a specified variable on a
numerical interval. For example `2 3 'X*(X-3)' 'X' Integrate` returns `-7/6`.

The function takes four arguments:

* The lower bound of the integration range
* The higher bound of the integration range
* The program or expression to evaluate
* The integration variable


## Root

Root-finder command. Returns a real number that is a value of the specified
variable for which the specified program or algebraic object most nearly
evaluates to zero or a local extremum. For example, `'X^2=3' 'X' 0` returns
`X:1.732050807568877293527446341953458`.

The function takes three arguments:

* The program or expression to evaluate
* The variable to solve for
* An initial guess, or a list containing an upper and lower guess.
2 changes: 1 addition & 1 deletion src/dm32/qspi_crc.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#define QSPI_DATA_SIZE 1529164
#define QSPI_DATA_SIZE 1529372
#define QSPI_DATA_CRC 0x000cfed6

2 changes: 1 addition & 1 deletion src/dm42/qspi_crc.h
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@

#define QSPI_DATA_SIZE 1527324
#define QSPI_DATA_SIZE 1527508
#define QSPI_DATA_CRC 0x000cfed6

0 comments on commit eb553d7

Please sign in to comment.