PDL::Math#
📦 stdpdl
Synopsis#
use PDL;
my $a = pdl [0, 1, 2, 3];
my $s = sin($a);
my $c = cos($a);
my $e = exp($a);
Provides element-wise transcendental, hyperbolic, rounding, error, and Bessel functions operating on PDL ndarrays. Each function accepts a single PDL (or plain scalar) and returns a new PDL with the operation applied element-wise.
Functions#
Other Functions#
polyval#
polyval($c, $x) — evaluate polynomial with coeffs c at x. Binop: (c, x) → y. Signature from Math.pd upstream.
polyroots#
polyroots($cr, $ci) — roots of a polynomial with complex coefficients. Signature: (cr, ci) → (rr, ri). Returns two PDLs in list context.
pow#
pow($a, $b) → $a ** $b, element-wise. Binop wrapper around pdl_run_pow. Mirrors Ops.rs’s binop_xs_c2rust pattern but lives here because pow is declared in Math.pd upstream.