Module numerics

Module numerics 

Source
Expand description

Numerical support without physics: complex helpers, forward-mode jets, broadcasting, fallible allocation and the parallel policy. treams-rs extension.

ModulesΒ§

broadcast πŸ”’
Elementwise evaluation over broadcast inputs, and its pullback. treams-rs extension.
jet πŸ”’
First-order forward-mode jets: a value with its derivatives along N directions, propagated through numerical kernels by local chain rules. N = 0 compiles out all derivative storage and arithmetic in forward evaluations. treams-rs extension.
memory πŸ”’
Allocations that return Error::OutOfMemory when the system refuses them, for outputs and workspaces that grow with the problem. treams-rs extension.
parallel πŸ”’
Serial or Rayon-parallel evaluation of independent items. treams-rs extension.

ConstantsΒ§

EULER πŸ”’
The Euler-Mascheroni constant.

FunctionsΒ§

complex_sqrt πŸ”’
The principal square root of z, equal to z.sqrt() up to rounding.
finite πŸ”’
Whether both parts of z are finite.
label_bits πŸ”’
The bits of a real mode label, such as an axial wavenumber, as an exact hash key. Adding zero turns -0.0 into +0.0, so the two zeros, which compare equal, share a key.
parity πŸ”’
(-1)^n as a float, for the sign factors of degrees and orders.
ratio πŸ”’
numerator / denominator without overflow or underflow in the denominator’s square.