### ----------------------------------------------------
### -- Math::Libgsl::Function
### -- Licenses: Artistic-2.0
### -- Authors: Fernando Santagata
### -- File: lib/Math/Libgsl/Function.rakumod
### ----------------------------------------------------
### -- Chunk 2 of 8
 $s, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Clausen integral
sub clausen(Num(Cool) $x --> Num) is export(:clausen) {
  gsl_sf_clausen($x);
}
sub clausen-e(Num(Cool) $x --> List) is export(:clausen) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_clausen_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Coulomb functions
# Coulomb Normalized Hydrogenic Bound States
sub hydrogenic-R1(Num(Cool) $Z, Num(Cool) $r --> Num) is export(:coulomb) {
  gsl_sf_hydrogenicR_1($Z.Num, $r);
}
sub hydrogenic-R1-e(Num(Cool) $Z, Num(Cool) $r --> List) is export(:coulomb) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_hydrogenicR_1_e($Z.Num, $r, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub hydrogenic-R(Int $n, Int $l, Num(Cool) $Z, Num(Cool) $r --> Num) is export(:coulomb) {
  gsl_sf_hydrogenicR($n, $l, $Z.Num, $r);
}
sub hydrogenic-R-e(Int $n, Int $l, Num(Cool) $Z, Num(Cool) $r --> List) is export(:coulomb) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_hydrogenicR_e($n, $l, $Z.Num, $r, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Coulomb Wave Functions
sub coulomb-wave-FG-e(Num(Cool) $eta, Num(Cool) $x where * > 0, Num(Cool) $LF where * > -½, Int $k --> List) is export(:coulomb) {
  my gsl_sf_result $F  .= new;
  my gsl_sf_result $Fp .= new;
  my gsl_sf_result $G  .= new;
  my gsl_sf_result $Gp .= new;
  my num64 ($expF, $expG);
  my $ret = gsl_sf_coulomb_wave_FG_e($eta.Num, $x.Num, $LF, $k, $F, $Fp, $G, $Gp, $expF, $expG);
  my $overflow = $ret == GSL_EOVRFLW ?? True !! False;
  fail X::Libgsl.new: errno => $ret if $ret > 0 && $ret ≠ GSL_EOVRFLW;
  return :Fval($F.val), :Ferr($F.err), :Fpval($Fp.val), :Fperr($Fp.err), :Gval($G.val), :Gerr($G.err), :Gpval($Gp.val), :Gperr($Gp.err), :$overflow, :$expF, :$expG;
}
sub coulomb-wave-F-array(Num(Cool) $lmin, UInt $kmax, Num(Cool) $eta, Num(Cool) $x where * > 0 --> List) is export(:coulomb) {
  my num64 $expF;
  my $outF = CArray[num64].allocate: $kmax + 1;
  my $ret  = gsl_sf_coulomb_wave_F_array($lmin.Num, $kmax, $eta.Num, $x, $outF, $expF);
  my $overflow = $ret == GSL_EOVRFLW ?? True !! False;
  fail X::Libgsl.new: errno => $ret if $ret > 0 && $ret ≠ GSL_EOVRFLW;
  return :$overflow, :$expF, :outF($outF.list);
}
sub coulomb-wave-FG-array(Num(Cool) $lmin, UInt $kmax, Num(Cool) $eta, Num(Cool) $x where * > 0 --> List) is export(:coulomb) {
  my num64 ($expF, $expG);
  my $outF = CArray[num64].allocate: $kmax + 1;
  my $outG = CArray[num64].allocate: $kmax + 1;
  my $ret = gsl_sf_coulomb_wave_FG_array($lmin.Num, $kmax, $eta.Num, $x, $outF, $outG, $expF, $expG);
  my $overflow = $ret == GSL_EOVRFLW ?? True !! False;
  fail X::Libgsl.new: errno => $ret if $ret > 0 && $ret ≠ GSL_EOVRFLW;
  return :$overflow, :$expF, :$expG, :outF($outF.list), :outG($outG.list);
}
sub coulomb-wave-FGp-array(Num(Cool) $lmin, UInt $kmax, Num(Cool) $eta, Num(Cool) $x where * > 0 --> List) is export(:coulomb) {
  my num64 ($expF, $expG);
  my $outF  = CArray[num64].allocate: $kmax + 1;
  my $outG  = CArray[num64].allocate: $kmax + 1;
  my $outFp = CArray[num64].allocate: $kmax + 1;
  my $outGp = CArray[num64].allocate: $kmax + 1;
  my $ret = gsl_sf_coulomb_wave_FGp_array($lmin.Num, $kmax, $eta.Num, $x, $outF, $outFp, $outG, $outGp, $expF, $expG);
  my $overflow = $ret == GSL_EOVRFLW ?? True !! False;
  fail X::Libgsl.new: errno => $ret if $ret > 0 && $ret ≠ GSL_EOVRFLW;
  return :$overflow, :$expF, :$expG, :outF($outF.list), :outG($outG.list), :outFp($outFp.list), :outGp($outGp.list);
}
sub coulomb-wave-sphF-array(Num(Cool) $lmin, UInt $kmax, Num(Cool) $eta, Num(Cool) $x where * > 0 --> List) is export(:coulomb) {
  my num64 $expF;
  my $outF  = CArray[num64].allocate: $kmax + 1;
  my $ret = gsl_sf_coulomb_wave_sphF_array($lmin.Num, $kmax, $eta.Num, $x, $outF, $expF);
  my $overflow = $ret == GSL_EOVRFLW ?? True !! False;
  fail X::Libgsl.new: errno => $ret if $ret > 0 && $ret ≠ GSL_EOVRFLW;
  return :$overflow, :$expF, :outF($outF.list);
}
# Coulomb Wave Function Normalization Constant
sub coulomb-CL-e(Num(Cool) $L where * > -1, Num(Cool) $eta --> List) is export(:coulomb) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_coulomb_CL_e($L.Num, $eta, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub coulomb-CL-array(Num(Cool) $lmin where * > -1, UInt $kmax, Num(Cool) $eta --> List) is export(:coulomb) {
  my $out = CArray[num64].allocate: $kmax + 1;
  my $ret = gsl_sf_coulomb_CL_array($lmin.Num, $kmax, $eta, $out);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $out.list;
}
# Coupling Coefficients
sub coupling3j(Int $two-ja, Int $two-jb, Int $two-jc, Int $two-ma, Int $two-mb, Int $two-mc --> Num) is export(:coupling) {
  gsl_sf_coupling_3j($two-ja, $two-jb, $two-jc, $two-ma, $two-mb, $two-mc);
}
sub coupling3j-e(Int $two-ja, Int $two-jb, Int $two-jc, Int $two-ma, Int $two-mb, Int $two-mc --> List) is export(:coupling) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_coupling_3j_e($two-ja, $two-jb, $two-jc, $two-ma, $two-mb, $two-mc, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub coupling6j(Int $two-ja, Int $two-jb, Int $two-jc, Int $two-jd, Int $two-je, Int $two-jf --> Num) is export(:coupling) {
  gsl_sf_coupling_6j($two-ja, $two-jb, $two-jc, $two-jd, $two-je, $two-jf);
}
sub coupling6j-e(Int $two-ja, Int $two-jb, Int $two-jc, Int $two-jd, Int $two-je, Int $two-jf --> List) is export(:coupling) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_coupling_6j_e($two-ja, $two-jb, $two-jc, $two-jd, $two-je, $two-jf, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub coupling9j(Int $two-ja, Int $two-jb, Int $two-jc, Int $two-jd, Int $two-je, Int $two-jf, Int $two-jg, Int $two-jh, Int $two-ji --> Num) is export(:coupling) {
  gsl_sf_coupling_9j($two-ja, $two-jb, $two-jc, $two-jd, $two-je, $two-jf, $two-jg, $two-jh, $two-ji);
}
sub coupling9j-e(Int $two-ja, Int $two-jb, Int $two-jc, Int $two-jd, Int $two-je, Int $two-jf, Int $two-jg, Int $two-jh, Int $two-ji --> List) is export(:coupling) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_coupling_9j_e($two-ja, $two-jb, $two-jc, $two-jd, $two-je, $two-jf, $two-jg, $two-jh, $two-ji, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Dawson Function
sub dawson(Num(Cool) $x --> Num) is export(:dawson) {
  gsl_sf_dawson($x);
}
sub dawson-e(Num(Cool) $x --> List) is export(:dawson) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_dawson_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Debye Functions
sub debye1(Num(Cool) $x --> Num) is export(:debye) {
  gsl_sf_debye_1($x);
}
sub debye1-e(Num(Cool) $x --> List) is export(:debye) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_debye_1_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub debye2(Num(Cool) $x --> Num) is export(:debye) {
  gsl_sf_debye_2($x);
}
sub debye2-e(Num(Cool) $x --> List) is export(:debye) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_debye_2_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub debye3(Num(Cool) $x --> Num) is export(:debye) {
  gsl_sf_debye_3($x);
}
sub debye3-e(Num(Cool) $x --> List) is export(:debye) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_debye_3_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub debye4(Num(Cool) $x --> Num) is export(:debye) {
  gsl_sf_debye_4($x);
}
sub debye4-e(Num(Cool) $x --> List) is export(:debye) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_debye_4_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub debye5(Num(Cool) $x --> Num) is export(:debye) {
  gsl_sf_debye_5($x);
}
sub debye5-e(Num(Cool) $x --> List) is export(:debye) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_debye_5_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub debye6(Num(Cool) $x --> Num) is export(:debye) {
  gsl_sf_debye_6($x);
}
sub debye6-e(Num(Cool) $x --> List) is export(:debye) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_debye_6_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Dilogarithms
sub dilog(Num(Cool) $x --> Num) is export(:dilog) {
  gsl_sf_dilog($x);
}
sub dilog-e(Num(Cool) $x --> List) is export(:dilog) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_dilog_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub complex-dilog-xy-e(Num(Cool) $x, Num(Cool) $y --> List) is export(:dilog) {
  my gsl_sf_result $re .= new;
  my gsl_sf_result $im .= new;
  my $ret = gsl_sf_complex_dilog_xy_e($x.Num, $y, $re, $im);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $re.val + i * $im.val, $re.err, $im.err;
}
sub complex-dilog-e(Num(Cool) $r, Num(Cool) $θ --> List) is export(:dilog) {
  my gsl_sf_result $re .= new;
  my gsl_sf_result $im .= new;
  my $ret = gsl_sf_complex_dilog_e($r.Num, $θ, $re, $im);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $re.val + i * $im.val, $re.err, $im.err;
}
sub complex-spence-xy-e(Num(Cool) $x, Num(Cool) $y --> List) is export(:dilog) {
  my gsl_sf_result $re .= new;
  my gsl_sf_result $im .= new;
  my $ret = gsl_sf_complex_spence_xy_e($x.Num, $y, $re, $im);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $re.val + i * $im.val, $re.err, $im.err;
}
# Multiplication with propagation of errors
sub multiply(Num(Cool) $x, Num(Cool) $y --> Num) is export(:mult) {
  gsl_sf_multiply($x.Num, $y);
}
sub multiply-e(Num(Cool) $x, Num(Cool) $y --> List) is export(:mult) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_multiply_e($x.Num, $y, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub multiply-err-e(Num(Cool) $x, Num(Cool) $dx, Num(Cool) $y, Num(Cool) $dy --> List) is export(:mult) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_multiply_err_e($x.Num, $dx.Num, $y.Num, $dy, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Elliptic Integrals
# Legendre complete
sub Kcomp(Num(Cool) $k, UInt $mode --> Num) is export(:ellint) {
  gsl_sf_ellint_Kcomp($k, $mode);
}
sub Kcomp-e(Num(Cool) $k, UInt $mode --> List) is export(:ellint) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_ellint_Kcomp_e($k, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Ecomp(Num(Cool) $k, UInt $mode --> Num) is export(:ellint) {
  gsl_sf_ellint_Ecomp($k, $mode);
}
sub Ecomp-e(Num(Cool) $k, UInt $mode --> List) is export(:ellint) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_ellint_Ecomp_e($k, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Pcomp(Num(Cool) $k, Num(Cool) $n, UInt $mode --> Num) is export(:ellint) {
  gsl_sf_ellint_Pcomp($k.Num, $n, $mode);
}
sub Pcomp-e(Num(Cool) $k, Num(Cool) $n, UInt $mode --> List) is export(:ellint) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_ellint_Pcomp_e($k.Num, $n, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub Dcomp(Num(Cool) $k, UInt $mode --> Num) is export(:ellint) {
  gsl_sf_ellint_Dcomp($k, $mode);
}
sub Dcomp-e(Num(Cool) $k, UInt $mode --> List) is export(:ellint) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_ellint_Dcomp_e($k, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Legendre incomplete
sub F(Num(Cool) $Φ, Num(Cool) $k, UInt $mode --> Num) is export(:ellint) {
  gsl_sf_ellint_F($Φ.Num, $k, $mode);
}
sub F-e(Num(Cool) $Φ, Num(Cool) $k, UInt $mode --> List) is export(:ellint) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_ellint_F_e($Φ.Num, $k, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub E(Num(Cool) $Φ, Num(Cool) $k, UInt $mode --> Num) is export(:ellint) {
  gsl_sf_ellint_E($Φ.Num, $k, $mode);
}
sub E-e(Num(Cool) $Φ, Num(Cool) $k, UInt $mode --> List) is export(:ellint) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_ellint_E_e($Φ.Num, $k, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub P(Num(Cool) $Φ, Num(Cool) $k, Num(Cool) $n, UInt $mode --> Num) is export(:ellint) {
  gsl_sf_ellint_P($Φ.Num, $k.Num, $n, $mode);
}
sub P-e(Num(Cool) $Φ, Num(Cool) $k, Num(Cool) $n, UInt $mode --> List) is export(:ellint) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_ellint_P_e($Φ.Num, $k.Num, $n, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub D(Num(Cool) $Φ, Num(Cool) $k, UInt $mode --> Num) is export(:ellint) {
  gsl_sf_ellint_D($Φ.Num, $k, $mode);
}
sub D-e(Num(Cool) $Φ, Num(Cool) $k, UInt $mode --> List) is export(:ellint) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_ellint_D_e($Φ.Num, $k, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Carlson forms
sub RC(Num(Cool) $x, Num(Cool) $y, UInt $mode --> Num) is export(:ellint) {
  gsl_sf_ellint_RC($x.Num, $y, $mode);
}
sub RC-e(Num(Cool) $x, Num(Cool) $y, UInt $mode --> List) is export(:ellint) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_ellint_RC_e($x.Num, $y, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub RD(Num(Cool) $x, Num(Cool) $y, Num(Cool) $z, UInt $mode --> Num) is export(:ellint) {
  gsl_sf_ellint_RD($x.Num, $y.Num, $z, $mode);
}
sub RD-e(Num(Cool) $x, Num(Cool) $y, Num(Cool) $z, UInt $mode --> List) is export(:ellint) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_ellint_RD_e($x.Num, $y.Num, $z, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub RF(Num(Cool) $x, Num(Cool) $y, Num(Cool) $z, UInt $mode --> Num) is export(:ellint) {
  gsl_sf_ellint_RF($x.Num, $y.Num, $z, $mode);
}
sub RF-e(Num(Cool) $x, Num(Cool) $y, Num(Cool) $z, UInt $mode --> List) is export(:ellint) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_ellint_RF_e($x.Num, $y.Num, $z, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub RJ(Num(Cool) $x, Num(Cool) $y, Num(Cool) $z, Num(Cool) $p, UInt $mode --> Num) is export(:ellint) {
  gsl_sf_ellint_RJ($x.Num, $y.Num, $z.Num, $p, $mode);
}
sub RJ-e(Num(Cool) $x, Num(Cool) $y, Num(Cool) $z, Num(Cool) $p, UInt $mode --> List) is export(:ellint) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_ellint_RJ_e($x.Num, $y.Num, $z.Num, $p, $mode, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Elliptic Functions (Jacobi)
sub elljac-e(Num(Cool) $u, Num(Cool) $m --> List) is export(:ellfun) {
  my num64 ($sn, $cn, $dn);
  my $ret = gsl_sf_elljac_e($u.Num, $m, $sn, $cn, $dn);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $sn, $cn, $dn;
}
# Error Functions
sub erf(Num(Cool) $x --> Num) is export(:err) {
  gsl_sf_erf($x);
}
sub erf-e(Num(Cool) $x --> List) is export(:err) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_erf_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub erfc(Num(Cool) $x --> Num) is export(:err) {
  gsl_sf_erfc($x);
}
sub erfc-e(Num(Cool) $x --> List) is export(:err) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_erfc_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub log-erfc(Num(Cool) $x --> Num) is export(:err) {
  gsl_sf_log_erfc($x);
}
sub log-erfc-e(Num(Cool) $x --> List) is export(:err) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_log_erfc_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub erf-Z(Num(Cool) $x --> Num) is export(:err) {
  gsl_sf_erf_Z($x);
}
sub erf-Z-e(Num(Cool) $x --> List) is export(:err) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_erf_Z_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub erf-Q(Num(Cool) $x --> Num) is export(:err) {
  gsl_sf_erf_Q($x);
}
sub erf-Q-e(Num(Cool) $x --> List) is export(:err) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_erf_Q_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub hazard(Num(Cool) $x --> Num) is export(:err) {
  gsl_sf_hazard($x);
}
sub hazard-e(Num(Cool) $x --> List) is export(:err) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_hazard_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Exponential Functions
sub gexp(Num(Cool) $x --> Num) is export(:exp) {
  gsl_sf_exp($x);
}
sub gexp-e(Num(Cool) $x --> List) is export(:exp) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_exp_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gexp-e10(Num(Cool) $x --> List) is export(:exp) {
  my gsl_sf_result_e10 $res .= new;
  my $ret = gsl_sf_exp_e10_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err, $res.e10;
}
sub gexp-mult(Num(Cool) $x, Num(Cool) $y --> Num) is export(:exp) {
  gsl_sf_exp_mult($x.Num, $y);
}
sub gexp-mult-e(Num(Cool) $x, Num(Cool) $y --> List) is export(:exp) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_exp_mult_e($x.Num, $y, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gexp-mult-e10(Num(Cool) $x, Num(Cool) $y --> List) is export(:exp) {
  my gsl_sf_result_e10 $res .= new;
  my $ret = gsl_sf_exp_mult_e10_e($x.Num, $y, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err, $res.e10;
}
# Relative Exponential Functions
sub gexpm1(Num(Cool) $x --> Num) is export(:exp) {
  gsl_sf_expm1($x);
}
sub gexpm1-e(Num(Cool) $x --> List) is export(:exp) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_expm1_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gexprel(Num(Cool) $x --> Num) is export(:exp) {
  gsl_sf_exprel($x);
}
sub gexprel-e(Num(Cool) $x --> List) is export(:exp) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_exprel_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gexprel2(Num(Cool) $x --> Num) is export(:exp) {
  gsl_sf_exprel_2($x);
}
sub gexprel2-e(Num(Cool) $x --> List) is export(:exp) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_exprel_2_e($x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gexprel-n(Int $n, Num(Cool) $x --> Num) is export(:exp) {
  gsl_sf_exprel_n($n, $x);
}
sub gexprel-n-e(Int $n, Num(Cool) $x --> List) is export(:exp) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_exprel_n_e($n, $x, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
# Exponentiation With Error Estimate
sub gexp-err-e(Num(Cool) $x, Num(Cool) $dx --> List) is export(:exp) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_exp_err_e($x.Num, $dx, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gexp-err-e10(Num(Cool) $x, Num(Cool) $dx --> List) is export(:exp) {
  my gsl_sf_result_e10 $res .= new;
  my $ret = gsl_sf_exp_err_e10_e($x.Num, $dx, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err, $res.e10;
}
sub gexp-mult-err-e(Num(Cool) $x, Num(Cool) $dx, Num(Cool) $y, Num(Cool) $dy --> List) is export(:exp) {
  my gsl_sf_result $res .= new;
  my $ret = gsl_sf_exp_mult_err_e($x.Num, $dx.Num, $y.Num, $dy, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err;
}
sub gexp-mult-err-e10(Num(Cool) $x, Num(Cool) $dx, Num(Cool) $y, Num(Cool) $dy --> List) is export(:exp) {
  my gsl_sf_result_e10 $res .= new;
  my $ret = gsl_sf_exp_mult_err_e10_e($x.Num, $dx.Num, $y.Num, $dy, $res);
  fail X::Libgsl.new: errno => $ret if $ret > 0;
  return $res.val, $res.err, $res.e10;
}
# Exponential Integrals
sub E1(Num(Cool) $x --> Num) is export(:expint) {
  gsl_sf_expint_E1($x);
