### ----------------------------------------------------
### -- Math::Libgsl::Function
### -- Licenses: Artistic-2.0
### -- Authors: Fernando Santagata
### -- File: lib/Math/Libgsl/Function.rakumod
### ----------------------------------------------------
### -- Chunk 5 of 8
_array_n($lmax);
  my $ret = gsl_sf_legendre_H3d_array($lmax, $lambda.Num, $eta, $out);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $out.list;
}
# Logarithm and Related Functions
sub gsl-log(Num(Cool) $x where * > 0 --> Num) is export(:log) {
  gsl_sf_log($x);
}
sub gsl-log-e(Num(Cool) $x where * > 0 --> List) is export(:log) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_log_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gsl-log-abs(Num(Cool) $x where * ≠ 0 --> Num) is export(:log) {
  gsl_sf_log_abs($x);
}
sub gsl-log-abs-e(Num(Cool) $x where * ≠ 0 --> List) is export(:log) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_log_abs_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gsl-log-complex-e(Num(Cool) $zr, Num(Cool) $zi --> List) is export(:log) {
  my gsl_sf_result $lnr .= new;
  my gsl_sf_result $θ .= new;
  my $ret = gsl_sf_complex_log_e($zr.Num, $zi, $lnr, $θ);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $lnr.val, $lnr.err, $θ.val, $θ.err;
}
sub gsl-log1plusx(Num(Cool) $x where * > -1 --> Num) is export(:log) {
  gsl_sf_log_1plusx($x);
}
sub gsl-log1plusx-e(Num(Cool) $x where * > -1 --> List) is export(:log) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_log_1plusx_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gsl-log1plusx-mx(Num(Cool) $x where * > -1 --> Num) is export(:log) {
  gsl_sf_log_1plusx_mx($x);
}
sub gsl-log1plusx-mx-e(Num(Cool) $x where * > -1 --> List) is export(:log) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_log_1plusx_mx_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Mathieu Functions
# Mathieu Function Workspace
sub mathieu-a(Int $n, Num(Cool) $q --> Num) is export(:mathieu) {
  gsl_sf_mathieu_a($n, $q);
}
sub mathieu-a-e(Int $n, Num(Cool) $q --> List) is export(:mathieu) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_mathieu_a_e($n, $q, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub mathieu-b(Int $n, Num(Cool) $q --> Num) is export(:mathieu) {
  gsl_sf_mathieu_b($n, $q);
}
sub mathieu-b-e(Int $n, Num(Cool) $q --> List) is export(:mathieu) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_mathieu_b_e($n, $q, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub mathieu-a-array(Int $order-min, Int $order-max, Num(Cool) $q --> List) is export(:mathieu) {
  my gsl_sf_mathieu_workspace $work = gsl_sf_mathieu_alloc($order-max - $order-min + 1, $q);
  my $out = CArray[num64].allocate: $order-max - $order-min + 1;
  my $ret = gsl_sf_mathieu_a_array($order-min, $order-max, $q, $work, $out);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  gsl_sf_mathieu_free($work);
  return $out.list;
}
sub mathieu-b-array(Int $order-min, Int $order-max, Num(Cool) $q --> List) is export(:mathieu) {
  my gsl_sf_mathieu_workspace $work = gsl_sf_mathieu_alloc($order-max - $order-min + 1, $q);
  my $out = CArray[num64].allocate: $order-max - $order-min + 1;
  my $ret = gsl_sf_mathieu_b_array($order-min, $order-max, $q, $work, $out);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  gsl_sf_mathieu_free($work);
  return $out.list;
}
# Angular Mathieu Functions
sub mathieu-ce(Int $n, Num(Cool) $q, Num(Cool) $x --> Num) is export(:mathieu) {
  gsl_sf_mathieu_ce($n, $q, $x);
}
sub mathieu-ce-e(Int $n, Num(Cool) $q, Num(Cool) $x --> List) is export(:mathieu) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_mathieu_ce_e($n, $q, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub mathieu-se(Int $n, Num(Cool) $q, Num(Cool) $x --> Num) is export(:mathieu) {
  gsl_sf_mathieu_se($n, $q, $x);
}
sub mathieu-se-e(Int $n, Num(Cool) $q, Num(Cool) $x --> List) is export(:mathieu) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_mathieu_se_e($n, $q, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub mathieu-ce-array(Int $order-min, Int $order-max, Num(Cool) $q, Num(Cool) $x --> List) is export(:mathieu) {
  my gsl_sf_mathieu_workspace $work = gsl_sf_mathieu_alloc($order-max - $order-min + 1, $q);
  my $out = CArray[num64].allocate: $order-max - $order-min + 1;
  my $ret = gsl_sf_mathieu_ce_array($order-min, $order-max, $q, $x,$work, $out);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  gsl_sf_mathieu_free($work);
  return $out.list;
}
sub mathieu-se-array(Int $order-min, Int $order-max, Num(Cool) $q, Num(Cool) $x --> List) is export(:mathieu) {
  my gsl_sf_mathieu_workspace $work = gsl_sf_mathieu_alloc($order-max - $order-min + 1, $q);
  my $out = CArray[num64].allocate: $order-max - $order-min + 1;
  my $ret = gsl_sf_mathieu_se_array($order-min, $order-max, $q, $x,$work, $out);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  gsl_sf_mathieu_free($work);
  return $out.list;
}
# Radial Mathieu Functions
sub mathieu-Mc(Int $j where * == 1|2, Int $n, Num(Cool) $q, Num(Cool) $x --> Num) is export(:mathieu) {
  gsl_sf_mathieu_Mc($j, $n, $q, $x);
}
sub mathieu-Mc-e(Int $j where * == 1|2, Int $n, Num(Cool) $q, Num(Cool) $x --> List) is export(:mathieu) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_mathieu_Mc_e($j, $n, $q, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub mathieu-Ms(Int $j where * == 1|2, Int $n, Num(Cool) $q, Num(Cool) $x --> Num) is export(:mathieu) {
  gsl_sf_mathieu_Ms($j, $n, $q, $x);
}
sub mathieu-Ms-e(Int $j where * == 1|2, Int $n, Num(Cool) $q, Num(Cool) $x --> List) is export(:mathieu) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_mathieu_Ms_e($j, $n, $q, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub mathieu-Mc-array(Int $j where * == 1|2, Int $nmin, Int $nmax, Num(Cool) $q, Num(Cool) $x --> List) is export(:mathieu) {
  my gsl_sf_mathieu_workspace $work = gsl_sf_mathieu_alloc($nmax - $nmin + 1, $q);
  my $out = CArray[num64].allocate: $nmax - $nmin + 1;
  my $ret = gsl_sf_mathieu_Mc_array($j, $nmin, $nmax, $q, $x, $work, $out);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  gsl_sf_mathieu_free($work);
  return $out.list;
}
sub mathieu-Ms-array(Int $j where * == 1|2, Int $nmin, Int $nmax, Num(Cool) $q, Num(Cool) $x --> List) is export(:mathieu) {
  my gsl_sf_mathieu_workspace $work = gsl_sf_mathieu_alloc($nmax - $nmin + 1, $q);
  my $out = CArray[num64].allocate: $nmax - $nmin + 1;
  my $ret = gsl_sf_mathieu_Ms_array($j, $nmin, $nmax, $q, $x, $work, $out);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  gsl_sf_mathieu_free($work);
  return $out.list;
}
# Power Function
sub pow-int(Num(Cool) $x, Int $n --> Num) is export(:pow) {
  gsl_sf_pow_int($x, $n);
}
sub pow-int-e(Num(Cool) $x, Int $n --> List) is export(:pow) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_pow_int_e($x, $n, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Psi (Digamma) Function
# Digamma Function
sub psi-int(UInt $n where * > 0 --> Num) is export(:psi) {
  gsl_sf_psi_int($n);
}
sub psi-int-e(UInt $n where * > 0 --> List) is export(:psi) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_psi_int_e($n, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub psi(Num(Cool) $x where * ≠ 0 --> Num) is export(:psi) {
  gsl_sf_psi($x);
}
sub psi-e(Num(Cool) $x where * ≠ 0 --> List) is export(:psi) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_psi_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub psi1piy(Num(Cool) $y --> Num) is export(:psi) {
  gsl_sf_psi_1piy($y);
}
sub psi1piy-e(Num(Cool) $y --> List) is export(:psi) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_psi_1piy_e($y, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Trigamma Function
sub psi1-int(UInt $n where * > 0 --> Num) is export(:psi) {
  gsl_sf_psi_1_int($n);
}
sub psi1-int-e(UInt $n where * > 0 --> List) is export(:psi) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_psi_1_int_e($n, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub psi1(Num(Cool) $x --> Num) is export(:psi) {
  gsl_sf_psi_1($x);
}
sub psi1-e(Num(Cool) $x --> List) is export(:psi) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_psi_1_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Polygamma Function
sub psin(UInt $n, Num(Cool) $x where * > 0 --> Num) is export(:psi) {
  gsl_sf_psi_n($n, $x);
}
sub psin-e(UInt $n, Num(Cool) $x where * > 0 --> List) is export(:psi) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_psi_n_e($n, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Synchrotron Functions
sub synchrotron1(Num(Cool) $x where * ≥ 0 --> Num) is export(:sync) {
  gsl_sf_synchrotron_1($x);
}
sub synchrotron1-e(Num(Cool) $x where * ≥ 0 --> List) is export(:sync) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_synchrotron_1_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub synchrotron2(Num(Cool) $x where * ≥ 0 --> Num) is export(:sync) {
  gsl_sf_synchrotron_2($x);
}
sub synchrotron2-e(Num(Cool) $x where * ≥ 0 --> List) is export(:sync) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_synchrotron_2_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Transport Functions
sub transport2(Num(Cool) $x where * ≥ 0 --> Num) is export(:transport) {
  gsl_sf_transport_2($x);
}
sub transport2-e(Num(Cool) $x where * ≥ 0 --> List) is export(:transport) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_transport_2_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub transport3(Num(Cool) $x where * ≥ 0 --> Num) is export(:transport) {
  gsl_sf_transport_3($x);
}
sub transport3-e(Num(Cool) $x where * ≥ 0 --> List) is export(:transport) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_transport_3_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub transport4(Num(Cool) $x where * ≥ 0 --> Num) is export(:transport) {
  gsl_sf_transport_4($x);
}
sub transport4-e(Num(Cool) $x where * ≥ 0 --> List) is export(:transport) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_transport_4_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub transport5(Num(Cool) $x where * ≥ 0 --> Num) is export(:transport) {
  gsl_sf_transport_5($x);
}
sub transport5-e(Num(Cool) $x where * ≥ 0 --> List) is export(:transport) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_transport_5_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Trigonometric Functions
# Circular Trigonometric Functions
sub gsl-sin(Num(Cool) $x --> Num) is export(:trig) {
  gsl_sf_sin($x);
}
sub gsl-sin-e(Num(Cool) $x --> List) is export(:trig) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_sin_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gsl-cos(Num(Cool) $x --> Num) is export(:trig) {
  gsl_sf_cos($x);
}
sub gsl-cos-e(Num(Cool) $x --> List) is export(:trig) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_cos_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gsl-hypot(Num(Cool) $x, Num(Cool) $y --> Num) is export(:trig) {
  gsl_sf_hypot($x, $y);
}
sub gsl-hypot-e(Num(Cool) $x, Num(Cool) $y --> List) is export(:trig) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_hypot_e($x, $y, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gsl-sinc(Num(Cool) $x --> Num) is export(:trig) {
  gsl_sf_sinc($x);
}
sub gsl-sinc-e(Num(Cool) $x --> List) is export(:trig) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_sinc_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Trigonometric Functions for Complex Arguments
sub gsl-complex-sin-e(Num(Cool) $zr, Num(Cool) $zi --> List) is export(:trig) {
  my gsl_sf_result $szr .= new;
  my gsl_sf_result $szi .= new;
  my $ret = gsl_sf_complex_sin_e($zr, $zi, $szr, $szi);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $szr.val, $szr.err, $szi.val, $szi.err;
}
sub gsl-complex-cos-e(Num(Cool) $zr, Num(Cool) $zi --> List) is export(:trig) {
  my gsl_sf_result $czr .= new;
  my gsl_sf_result $czi .= new;
  my $ret = gsl_sf_complex_cos_e($zr, $zi, $czr, $czi);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $czr.val, $czr.err, $czi.val, $czi.err;
}
sub gsl-complex-logsin-e(Num(Cool) $zr, Num(Cool) $zi --> List) is export(:trig) {
  my gsl_sf_result $lszr .= new;
  my gsl_sf_result $lszi .= new;
  my $ret = gsl_sf_complex_logsin_e($zr, $zi, $lszr, $lszi);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $lszr.val, $lszr.err, $lszi.val, $lszi.err;
}
# Hyperbolic Trigonometric Functions
sub gsl-lnsinh(Num(Cool) $x where * > 0 --> Num) is export(:trig) {
  gsl_sf_lnsinh($x);
}
sub gsl-lnsinh-e(Num(Cool) $x where * > 0 --> List) is export(:trig) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_lnsinh_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gsl-lncosh(Num(Cool) $x --> Num) is export(:trig) {
  gsl_sf_lncosh($x);
}
sub gsl-lncosh-e(Num(Cool) $x --> List) is export(:trig) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_lncosh_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Conversion Functions
sub polar-to-rect(Num(Cool) $r, Num(Cool) $θ where -π ≤ * ≤ π --> List) is export(:trig) {
  my gsl_sf_result $x .= new;
  my gsl_sf_result $y .= new;
  my $ret = gsl_sf_polar_to_rect($r, $θ, $x, $y);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $x.val, $x.err, $y.val, $y.err;
}
sub rect-to-polar(Num(Cool) $x, Num(Cool) $y --> List) is export(:trig) {
  my gsl_sf_result $r .= new;
  my gsl_sf_result $θ .= new;
  my $ret = gsl_sf_rect_to_polar($x, $y, $r, $θ);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $r.val, $r.err, $θ.val, $θ.err;
}
# Restriction Functions
sub angle-restrict-symm(Num(Cool) $θ --> Num) is export(:trig) {
  gsl_sf_angle_restrict_symm($θ);
}
sub angle-restrict-symm-e(Num(Cool) $θ --> Num) is export(:trig) {
  my num64 $t = $θ;
  my $ret = gsl_sf_angle_restrict_symm_e($t);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $t;
}
sub angle-restrict-pos(Num(Cool) $θ --> Num) is export(:trig) {
  gsl_sf_angle_restrict_pos($θ);
}
sub angle-restrict-pos-e(Num(Cool) $θ --> Num) is export(:trig) {
  my num64 $t = $θ;
  my $ret = gsl_sf_angle_restrict_pos_e($t);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $t;
}
sub gsl-sin-err-e(Num(Cool) $x, Num(Cool) $dx --> List) is export(:trig) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_sin_err_e($x, $dx, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gsl-cos-err-e(Num(Cool) $x, Num(Cool) $dx --> List) is export(:trig) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_cos_err_e($x, $dx, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Zeta Functions
# Riemann Zeta Function
sub zeta-int(Int $n where * ≠ 1 --> Num) is export(:zeta) {
  gsl_sf_zeta_int($n);
}
sub zeta-int-e(Int $n where * ≠ 1 --> List) is export(:zeta) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_zeta_int_e($n, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub zeta(Num(Cool) $s where * ≠ 1 --> Num) is export(:zeta) {
  gsl_sf_zeta($s);
}
sub zeta-e(Num(Cool) $s where * ≠ 1 --> List) is export(:zeta) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_zeta_e($s, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Riemann Zeta Function Minus One
sub zetam1-int(Int $n where * ≠ 1 --> Num) is export(:zeta) {
  gsl_sf_zetam1_int($n);
}
sub zetam1-int-e(Int $n where * ≠ 1 --> List) is export(:zeta) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_zetam1_int_e($n, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub zetam1(Num(Cool) $s where * ≠ 1 --> Num) is export(:zeta) {
  gsl_sf_zetam1($s);
}
sub zetam1-e(Num(Cool) $s where * ≠ 1 --> List) is export(:zeta) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_zetam1_e($s, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Hurwitz Zeta Function
sub hzeta(Num(Cool) $s where * > 1, Num(Cool) $q where * > 0 --> Num) is export(:zeta) {
  gsl_sf_hzeta($s, $q);
}
sub hzeta-e(Num(Cool) $s where * > 1, Num(Cool) $q where * > 0 --> List) is export(:zeta) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_hzeta_e($s, $q, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Eta Function
sub eta-int(Int $n --> Num) is export(:zeta) {
  gsl_sf_eta_int($n);
}
sub eta-int-e(Int $n --> List) is export(:zeta) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_eta_int_e($n, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub eta(Num(Cool) $s --> Num) is export(:zeta) {
  gsl_sf_eta($s);
}
sub eta-e(Num(Cool) $s --> List) is export(:zeta) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_eta_e($s, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}

=begin pod

=head1 NAME

Math::Libgsl::Function - An interface to libgsl, the Gnu Scientific Library - Special functions.

=head1 SYNOPSIS

=begin code :lang<raku>

use Math::Libgsl::Raw::Function :ALL;

use Math::Libgsl::Function :ALL;

=end code

=head1 DESCRIPTION

Math::Libgsl::Function provides an interface to special function evaluation in libgsl, the GNU Scientific Library.

Math::Libgsl::Function makes these tags available:

=item :airy
=item :bessel
=item :coulomb
=item :coupling
=item :dawson
=item :debye
=item :dilog
=item :mult
=item :ellint
=item :ellfun
=item :err
=item :exp
=item :fermidirac
=item :gammabeta
=item :gegen
=item :hermite
=item :hyperg
=item :laguerre
=item :lambert
=item :legendre
=item :log
=item :mathieu
=item :pow
=item :psi
=item :sync
=item :transport
=item :trig
=item :zeta

Throughout this module the subs whose name ends with "-e" return a List of two values: the result and its associated error.

=head3 sub Ai(Num(Cool) $x, UInt $mode --> Num) is export(:airy)
=head3 sub Ai-e(Num(Cool) $x, UInt $mode --> List) is export(:airy)

These routines compute the Airy function Ai(x) with an accuracy specified by mode.

=head3 sub Bi(Num(Cool) $x, UInt $mode --> Num) is export(:airy)
=head3 sub Bi-e(Num(Cool) $x, UInt $mode --> List) is export(:airy)

These routines compute the Airy function Bi(x) with an accuracy specified by mode.

=head3 sub Ai-scaled(Num(Cool) $x, UInt $mode --> Num) is export(:airy)
=head3 sub Ai-scaled-e(Num(Cool) $x, UInt $mode --> List) is export(:airy)

These routines compute the scaled value of the Airy function Ai(x) with an accuracy specified by mode.

=head3 sub Bi-scaled(Num(Cool) $x, UInt $mode --> Num) is export(:airy)
=head3 sub Bi-scaled-e(Num(Cool) $x, UInt $mode --> List) is export(:airy)

These routines compute the scaled value of the Airy function Bi(x) with an accuracy specified by mode.

=head3 sub Ai-deriv(Num(Cool) $x, UInt $mode --> Num) is export(:airy)
=head3 sub Ai-deriv-e(Num(Cool) $x, UInt $mode --> List) is export(:airy)

These routines compute the scaled value of the Airy function derivative A'i(x) with an accuracy specified by mode.

=head3 sub Bi-deriv(Num(Cool) $x, UInt $mode --> Num) is export(:airy)
=head3 sub Bi-deriv-e(Num(Cool) $x, UInt $mode --> List) is export(:airy)

These routines compute the scaled value of the Airy function derivative B'i(x) with an accuracy specified by mode.

=head3 sub Ai-deriv-scaled(Num(Cool) $x, UInt $mode --> Num) is export(:airy)
=head3 sub Ai-deriv-scaled-e(Num(Cool) $x, UInt $mode --> List) is export(:airy)

These routines compute the scaled value of the Airy function derivative A'i(x) with an accuracy specified by mode.

=head3 sub Bi-deriv-scaled(Num(Cool) $x, UInt $mode --> Num) is export(:airy)
=head3 sub Bi-deriv-scaled-e(Num(Cool) $x, UInt $mode --> List) is export(:airy)

These routines compute the scaled value of the Airy function derivative B'i(x) with an accuracy specified by mode.

=head3 sub Ai-zero(UInt $s --> Num) is export(:airy)
=head3 sub Ai-zero-e(UInt $s --> List) is export(:airy)

These routines compute the location of the s-th zero of the Airy function Ai(x).

=head3 sub Bi-zero(UInt $s --> Num) is export(:airy)
=head3 sub Bi-zero-e(UInt $s --> List) is export(:airy)

These routines compute the location of the s-th zero of the Airy function Bi(x).

=head3 sub Ai-deriv-zero(UInt $s --> Num) is export(:airy)
=head3 sub Ai-deriv-zero-e(UInt $s --> List) is export(:airy)

These routines compute the location of the s-th zero of the Airy function derivative A'i(x).

=head3 sub Bi-deriv-zero(UInt $s --> Num) is export(:airy)
=head3 sub Bi-deriv-zero-e(UInt $s --> List) is export(:airy)

These routines compute the location of the s-th zero of the Airy function derivative B'i(x).

=head3 sub J0(Num(Cool) $x --> Num) is export(:bessel)
=head3 sub J0-e(Num(Cool) $x --> List) is export(:bessel)

These routines compute the regular cylindrical Bessel function of zeroth order, J₀(x).

=head3 sub J1(Num(Cool) $x --> Num) is export(:bessel)
=head3 sub J1-e(Num(Cool) $x --> List) is export(:bessel)

These routines compute the regular cylindrical Bessel function of first order, J₁(x).

=head3 sub Jn(Int $n, Num(Cool) $x --> Num) is export(:bessel)
=head3 sub Jn-e(Int $n, Num(Cool) $x --> List) is export(:bessel)

These routines compute the regular cylindrical Bessel function of order n, Jₙ(x).

=head3 sub Jn-array(Int $nmin, Int $nmax where $nmin < $nmax, Num(Cool) $x --> List) is export(:bessel)

This routine computes the values of the regular cylindrical Bessel functions Jₙ(x) for n from nmin to nmax inclusive.

=head3 sub Y0(Num(Cool) $x where * > 0 --> Num) is export(:bessel)
=head3 sub Y0-e(Num(Cool) $x where * > 0 --> List) is export(:bessel)

These routines compute the irregular cylindrical Bessel function of zeroth order, Y₀(x).

=head3 sub Y1(Num(Cool) $x where * > 0 --> Num) is export(:bessel)
