### ----------------------------------------------------
### -- Math::Libgsl::Function
### -- Licenses: Artistic-2.0
### -- Authors: Fernando Santagata
### -- File: lib/Math/Libgsl/Function.rakumod
### ----------------------------------------------------
### -- Chunk 1 of 8
use v6;

unit module Math::Libgsl::Function:ver<0.0.3>:auth<zef:FRITH>;

use NativeCall;
use Math::Libgsl::Raw::Function :ALL;
use Math::Libgsl::Exception;
use Math::Libgsl::Constants;

# Airy Functions
sub Ai(Num(Cool) $x, UInt $mode --> Num) is export(:airy) {
  gsl_sf_airy_Ai($x, $mode);
}
sub Ai-e(Num(Cool) $x, UInt $mode --> List) is export(:airy) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_airy_Ai_e($x, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Bi(Num(Cool) $x, UInt $mode --> Num) is export(:airy) {
  gsl_sf_airy_Bi($x, $mode);
}
sub Bi-e(Num(Cool) $x, UInt $mode --> List) is export(:airy) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_airy_Bi_e($x, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Ai-scaled(Num(Cool) $x, UInt $mode --> Num) is export(:airy) {
  gsl_sf_airy_Ai_scaled($x, $mode);
}
sub Ai-scaled-e(Num(Cool) $x, UInt $mode --> List) is export(:airy) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_airy_Ai_scaled_e($x, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Bi-scaled(Num(Cool) $x, UInt $mode --> Num) is export(:airy) {
  gsl_sf_airy_Bi_scaled($x, $mode);
}
sub Bi-scaled-e(Num(Cool) $x, UInt $mode --> List) is export(:airy) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_airy_Bi_scaled_e($x, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Derivatives of Airy Functions
sub Ai-deriv(Num(Cool) $x, UInt $mode --> Num) is export(:airy) {
  gsl_sf_airy_Ai_deriv($x, $mode);
}
sub Ai-deriv-e(Num(Cool) $x, UInt $mode --> List) is export(:airy) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_airy_Ai_deriv_e($x, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Bi-deriv(Num(Cool) $x, UInt $mode --> Num) is export(:airy) {
  gsl_sf_airy_Bi_deriv($x, $mode);
}
sub Bi-deriv-e(Num(Cool) $x, UInt $mode --> List) is export(:airy) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_airy_Bi_deriv_e($x, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Ai-deriv-scaled(Num(Cool) $x, UInt $mode --> Num) is export(:airy) {
  gsl_sf_airy_Ai_deriv_scaled($x, $mode);
}
sub Ai-deriv-scaled-e(Num(Cool) $x, UInt $mode --> List) is export(:airy) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_airy_Ai_deriv_scaled_e($x, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Bi-deriv-scaled(Num(Cool) $x, UInt $mode --> Num) is export(:airy) {
  gsl_sf_airy_Bi_deriv_scaled($x, $mode);
}
sub Bi-deriv-scaled-e(Num(Cool) $x, UInt $mode --> List) is export(:airy) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_airy_Bi_deriv_scaled_e($x, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Zeros of Airy Functions
sub Ai-zero(UInt $s --> Num) is export(:airy) {
  gsl_sf_airy_zero_Ai($s);
}
sub Ai-zero-e(UInt $s --> List) is export(:airy) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_airy_zero_Ai_e($s, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Bi-zero(UInt $s --> Num) is export(:airy) {
  gsl_sf_airy_zero_Bi($s);
}
sub Bi-zero-e(UInt $s --> List) is export(:airy) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_airy_zero_Bi_e($s, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Zeros of Derivatives of Airy Functions
sub Ai-deriv-zero(UInt $s --> Num) is export(:airy) {
  gsl_sf_airy_zero_Ai_deriv($s);
}
sub Ai-deriv-zero-e(UInt $s --> List) is export(:airy) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_airy_zero_Ai_deriv_e($s, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Bi-deriv-zero(UInt $s --> Num) is export(:airy) {
  gsl_sf_airy_zero_Bi_deriv($s);
}
sub Bi-deriv-zero-e(UInt $s --> List) is export(:airy) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_airy_zero_Bi_deriv_e($s, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Regular Cylindrical Bessel Functions
sub J0(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_J0($x);
}
sub J0-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_J0_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub J1(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_J1($x);
}
sub J1-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_J1_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Jn(Int $n, Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_Jn($n, $x);
}
sub Jn-e(Int $n, Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_Jn_e($n, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Jn-array(Int $nmin, Int $nmax where $nmin < $nmax, Num(Cool) $x --> List) is export(:bessel) {
  my $out = CArray[num64].allocate: $nmax - $nmin + 1;
  gsl_sf_bessel_Jn_array($nmin, $nmax, $x, $out);
  return $out.list;
}
sub Y0(Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_Y0($x);
}
sub Y0-e(Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_Y0_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Y1(Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_Y1($x);
}
sub Y1-e(Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_Y1_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Yn(Int $n, Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_Yn($n, $x);
}
sub Yn-e(Int $n, Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_Yn_e($n, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Yn-array(Int $nmin, Int $nmax where $nmin < $nmax, Num(Cool) $x --> List) is export(:bessel) {
  my $out = CArray[num64].allocate: $nmax - $nmin + 1;
  gsl_sf_bessel_Yn_array($nmin, $nmax, $x, $out);
  return $out.list;
}
# Regular Modified Cylindrical Bessel Functions
sub I0(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_I0($x);
}
sub I0-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_I0_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub I1(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_I1($x);
}
sub I1-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_I1_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub In(Int $n, Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_In($n, $x);
}
sub In-e(Int $n, Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_In_e($n, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub In-array(UInt $nmin, UInt $nmax where $nmin < $nmax, Num(Cool) $x --> List) is export(:bessel) {
  my $out = CArray[num64].allocate: $nmax - $nmin + 1;
  gsl_sf_bessel_In_array($nmin, $nmax, $x, $out);
  return $out.list;
}
sub I0-scaled(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_I0_scaled($x);
}
sub I0-scaled-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_I0_scaled_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub I1-scaled(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_I1_scaled($x);
}
sub I1-scaled-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_I1_scaled_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub In-scaled(Int $n, Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_In_scaled($n, $x);
}
sub In-scaled-e(Int $n, Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_In_scaled_e($n, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub In-scaled-array(UInt $nmin, UInt $nmax where $nmin < $nmax, Num(Cool) $x --> List) is export(:bessel) {
  my $out = CArray[num64].allocate: $nmax - $nmin + 1;
  gsl_sf_bessel_In_scaled_array($nmin, $nmax, $x, $out);
  return $out.list;
}
sub K0(Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_K0($x);
}
sub K0-e(Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_K0_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub K1(Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_K1($x);
}
sub K1-e(Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_K1_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Kn(Int $n, Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_Kn($n, $x);
}
sub Kn-e(Int $n, Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_Kn_e($n, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Kn-array(UInt $nmin, UInt $nmax where $nmin < $nmax, Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my $out = CArray[num64].allocate: $nmax - $nmin + 1;
  gsl_sf_bessel_Kn_array($nmin, $nmax, $x, $out);
  return $out.list;
}
sub K0-scaled(Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_K0_scaled($x);
}
sub K0-scaled-e(Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_K0_scaled_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub K1-scaled(Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_K1_scaled($x);
}
sub K1-scaled-e(Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_K1_scaled_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Kn-scaled(Int $n, Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_Kn_scaled($n, $x);
}
sub Kn-scaled-e(Int $n, Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_Kn_scaled_e($n, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Kn-scaled-array(UInt $nmin, UInt $nmax where $nmin < $nmax, Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my $out = CArray[num64].allocate: $nmax - $nmin + 1;
  gsl_sf_bessel_Kn_scaled_array($nmin, $nmax, $x, $out);
  return $out.list;
}
sub j0(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_j0($x);
}
sub j0-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_j0_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub j1(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_j1($x);
}
sub j1-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_j1_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub j2(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_j2($x);
}
sub j2-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_j2_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub jl(UInt $l, Num(Cool) $x where * ≥ 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_jl($l, $x);
}
sub jl-e(UInt $l, Num(Cool) $x where * ≥ 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_jl_e($l, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub jl-array(UInt $lmax, Num(Cool) $x where * ≥ 0 --> List) is export(:bessel) {
  my $out = CArray[num64].allocate: $lmax + 1;
  gsl_sf_bessel_jl_array($lmax, $x, $out);
  return $out.list;
}
sub jl-steed-array(UInt $lmax, Num(Cool) $x where * ≥ 0 --> List) is export(:bessel) {
  my $out = CArray[num64].allocate: $lmax + 1;
  gsl_sf_bessel_jl_steed_array($lmax, $x, $out);
  return $out.list;
}
# Irregular Spherical Bessel Functions
sub y0(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_y0($x);
}
sub y0-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_y0_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub y1(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_y1($x);
}
sub y1-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_y1_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub y2(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_y2($x);
}
sub y2-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_y2_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub yl(UInt $l, Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_yl($l, $x);
}
sub yl-e(UInt $l, Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_yl_e($l, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub yl-array(UInt $lmax, Num(Cool) $x --> List) is export(:bessel) {
  my $out = CArray[num64].allocate: $lmax + 1;
  gsl_sf_bessel_yl_array($lmax, $x, $out);
  return $out.list;
}
# Regular Modified Spherical Bessel Functions
sub i0-scaled(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_i0_scaled($x);
}
sub i0-scaled-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_i0_scaled_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub i1-scaled(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_i1_scaled($x);
}
sub i1-scaled-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_i1_scaled_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub i2-scaled(Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_i2_scaled($x);
}
sub i2-scaled-e(Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_i2_scaled_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub il-scaled(UInt $l, Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_il_scaled($l, $x);
}
sub il-scaled-e(UInt $l, Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_il_scaled_e($l, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub il-scaled-array(UInt $lmax, Num(Cool) $x --> List) is export(:bessel) {
  my $out = CArray[num64].allocate: $lmax + 1;
  gsl_sf_bessel_il_scaled_array($lmax, $x, $out);
  return $out.list;
}
# Irregular Modified Spherical Bessel Functions
sub k0-scaled(Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_k0_scaled($x);
}
sub k0-scaled-e(Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_k0_scaled_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub k1-scaled(Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_k1_scaled($x);
}
sub k1-scaled-e(Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_k1_scaled_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub k2-scaled(Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_k2_scaled($x);
}
sub k2-scaled-e(Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_k2_scaled_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub kl-scaled(UInt $l, Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_kl_scaled($l, $x);
}
sub kl-scaled-e(UInt $l, Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_kl_scaled_e($l, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub kl-scaled-array(UInt $lmax, Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my $out = CArray[num64].allocate: $lmax + 1;
  gsl_sf_bessel_kl_scaled_array($lmax, $x, $out);
  return $out.list;
}
# Regular Bessel Function—Fractional Order
sub Jnu(Num(Cool) $ν, Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_Jnu($ν.Num, $x);
}
sub Jnu-e(Num(Cool) $ν, Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_Jnu_e($ν.Num, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Jnu-sequence(Num(Cool) $ν, UInt $mode, Positional $x --> List) is export(:bessel) {
  my CArray[num64] $v .= new: $x».Num;
  my $ret = gsl_sf_bessel_sequence_Jnu_e($ν, $mode, $v.elems, $v);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $v.list;
}
# Irregular Bessel Function—Fractional Order
sub Ynu(Num(Cool) $ν, Num(Cool) $x --> Num) is export(:bessel) {
  gsl_sf_bessel_Ynu($ν.Num, $x);
}
sub Ynu-e(Num(Cool) $ν, Num(Cool) $x --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_Ynu_e($ν.Num, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Regular Modified Bessel Functions—Fractional Order
sub Inu(Num(Cool) $ν where * > 0, Num(Cool) $x where * > 0--> Num) is export(:bessel) {
  gsl_sf_bessel_Inu($ν.Num, $x);
}
sub Inu-e(Num(Cool) $ν where * > 0, Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_Inu_e($ν.Num, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Inu-scaled(Num(Cool) $ν where * > 0, Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_Inu_scaled($ν.Num, $x);
}
sub Inu-scaled-e(Num(Cool) $ν where * > 0, Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_Inu_scaled_e($ν.Num, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Irregular Modified Bessel Functions—Fractional Order
sub Knu(Num(Cool) $ν where * > 0, Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_Knu($ν.Num, $x);
}
sub Knu-e(Num(Cool) $ν where * > 0, Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_Knu_e($ν.Num, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub lnKnu(Num(Cool) $ν where * > 0, Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_lnKnu($ν.Num, $x);
}
sub lnKnu-e(Num(Cool) $ν where * > 0, Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_lnKnu_e($ν.Num, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Knu-scaled(Num(Cool) $ν where * > 0, Num(Cool) $x where * > 0 --> Num) is export(:bessel) {
  gsl_sf_bessel_Knu_scaled($ν.Num, $x);
}
sub Knu-scaled-e(Num(Cool) $ν where * > 0, Num(Cool) $x where * > 0 --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_Knu_scaled_e($ν.Num, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Zeros of Regular Bessel Functions
sub J0-zero(UInt $s --> Num) is export(:bessel) {
  gsl_sf_bessel_zero_J0($s);
}
sub J0-zero-e(UInt $s --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_zero_J0_e($s, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub J1-zero(UInt $s --> Num) is export(:bessel) {
  gsl_sf_bessel_zero_J1($s);
}
sub J1-zero-e(UInt $s --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_zero_J1_e($s, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Jnu-zero(Num(Cool) $ν where * ≥ 0, UInt $s --> Num) is export(:bessel) {
  gsl_sf_bessel_zero_Jnu($ν, $s);
}
sub Jnu-zero-e(Num(Cool) $ν where * ≥ 0, UInt $s --> List) is export(:bessel) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_bessel_zero_Jnu_e($ν,