Agena v. 3.11.5 (24/3/2024, Alexander Walz) |
Readme/What's new |
3.11.5 Converse, March 24, 2024
Tuned, extended and fixed calculus functions that compute integrals:
- `calc.intdei` and `calc.intdeo` now remember the last epsilon setting given by the user and run 40 % faster with succeeding calls done
with the same epsilon value. This also benefits the wrapper function `calc.integ` (see below).
- `calc.gauleg`, `calc.intde`, calc.intdei`, `calc.intdeo` and `calc.intcc` now accept multivariate functions. See the Primer and Reference
on how to pass the second, third, etc. arguments in the respective calls. With univariate functions, as before, you do not have to change
the code.
- `calc.integ` has been rewritten to support multivariate functions. Optional epsilon, omega and sample values must now be given as explicit
options, so you may have to adapt your code. Example:
> calc.integ(<< x, a -> x + a >>, 1, 2, 0, eps=hEps, omega=1, samples=100):
1.5 2.999999997239e-015
- If the third argument to `calc.intdeo` was zero, the interpreter could crash on some platforms. This has been fixed.
- If the number of sample points is zero, `calc.gauleg` now automatically sets it to 20 points internally. This prevents segmentation
faults on some platforms and also false results of exactly zero.
- If you pass zero as an epsilon value to `calc.intde`, calc.intdei`, `calc.intdeo` and `calc.intcc`, then it is automatically reset to
the default setting 1e-15 to avert any infinite loops.
- This release has been Valgrind-checked on x86 and AMD64 Linux to ensure there are no internal errors or memory leaks. |
Agena v. 3.9.2a (9/1/2024, Alexander Walz) |
Readme/What's new |
3.9.2 Rayne, January 09, 2024
- With (deeply) nested tables, `map` and `subs` can recursively descend into the entire structure and map a function or substitute values
with only just one call, with the new `descend=true` option:
> map(<< x -> 2*x >>, [1, 2, 3, [4, 5, [6]]], descend=true):
[2, 4, 6, [8, 10, [12]]]
> subs(1:0, 6:10, [1, 2, 3, [4, 5, [6]]], descend=true):
[0, 2, 3, [4, 5, [10]]]
Sequences, registers, sets, pairs and complex numbers, however, are not accepted in the input structure.
- With tables as input, `map` now supports the 'reshuffle' option, removing any holes in the result before returning it. Just an example:
> a := [1, 2, 3, 4, 5];
> a[3] := null; # we create a hole
> a:
[1 ~ 1, 2 ~ 2, 4 ~ 4, 5 ~ 5]
> map(<< x -> 2*x >>, a): # no reordering, index 3 is still not assigned a value
[1 ~ 2, 2 ~ 4, 4 ~ 8, 5 ~ 10]
> map(<< x -> 2*x >>, a, reshuffle=true): # return a concise table array with consecutive integral indices
[2, 4, 8, 10]
- Hardened `map` against stack corruption in `multret=true` mode.
- When given a non-supported option, `map`, `subs, `subsop`, `select`, `remove` and `selectremove` now issue an error.
- The C API function `lua_call` now returns the number of results actually pushed onto the stack in a function call.
- This release has been Valgrind-checked on x86 and AMD64 Linux to ensure there are no internal errors or memory leaks. |
Comments
Alexander Walz
Sat, 13/05/2017 - 20:06
Permalink
Hello,
Add new comment