Agena v. 3.16.1 (11/5/2024, Alexander Walz) |
Readme/What's new |
3.16.1 Anson, May 11, 2024
- In the past, when a number was suffixed by the letter 'd', the number was multiplied by 12 (dozen notation). Now the number is assumed
to represent degrees and is automatically converted to radians through multiplication by Pi/180.
> 90d:
1.5707963267949
Likewise, if a number is suffixed by the letter 'r', it is assumed to be in radians and automatically converted to degrees through
multiplication by 180/Pi:
> 1.5707963267949r:
90
The suffix 'D' still represents dozens, so for example:
> 10D:
120
- New `math.todegrees` is the complement to `math.toradians` and converts radians to degrees:
> math.todegrees(Pi/2):
90
- `math.todecimal` did not work well - or unexpectedly - with negative components. This has been fixed by converting all values to positive
while preserving the sign in the result.
> math.todecimal(-1, 30, 45):
-1.5125
> math.todecimal(-1, 30, -45):
-1.5125
- Likewise, `math.toradians` did not work well with negative optional arguments. This has been fixed the same way as for `math.todecimal`.
- `math.dd` was 16 times slower than equivalent `math.todec`, because the former used string parsing and the latter a precise numeric
approach. So from now on, `math.dd` uses the same code as `math.todec`, the latter which has also now been deprecated. An alias
has been provided to ensure backward-compatibility.
- `math.splitdms` has been tuned by eight times, now using arithmetics instead of string processing. |
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. |
Commenti
Alexander Walz
Sab, 13/05/2017 - 20:06
Collegamento permanente
Hello,
Aggiungi un commento