func TestSf(t *testing.T) { var x float64 = 5.0 var result sf.GslSfResult expected := -0.17759677131433830434739701 status := bessel.J0E(x, &result) fmt.Printf("status = %s\n", gogsl.GslError(status).String()) fmt.Printf("J0(5.0) = %.18f\n"+ " +/- % .18f\n", result.Val(), result.Err()) fmt.Printf("exact = %.18f\n", expected) if math.Abs(result.Val()-expected) > result.Err() { t.Error("incorrect value") } }
func LnchooseE(n uint32, m uint32, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_lnchoose_e(C.uint(n), C.uint(m), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func LaguerreNE(n int32, a float64, x float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_laguerre_n_e(C.int(n), C.double(a), C.double(x), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func LngammaSgnE(x float64, resultLg *sf.GslSfResult) (int32, float64) { var _outptr_2 C.double _result := int32(C.gsl_sf_lngamma_sgn_e(C.double(x), (*C.gsl_sf_result)(unsafe.Pointer(resultLg.Ptr())), &_outptr_2)) return _result, *(*float64)(unsafe.Pointer(&_outptr_2)) }
func LngammaComplexE(zr float64, zi float64, lnr *sf.GslSfResult, arg *sf.GslSfResult) int32 { return int32(C.gsl_sf_lngamma_complex_e(C.double(zr), C.double(zi), (*C.gsl_sf_result)(unsafe.Pointer(lnr.Ptr())), (*C.gsl_sf_result)(unsafe.Pointer(arg.Ptr())))) }
func PochrelE(a float64, x float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_pochrel_e(C.double(a), C.double(x), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func LnbetaE(a float64, b float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_lnbeta_e(C.double(a), C.double(b), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func RJE(x float64, y float64, z float64, p float64, mode sf.GslMode, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_ellint_RJ_e(C.double(x), C.double(y), C.double(z), C.double(p), C.gsl_mode_t(mode), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func Wm1E(x float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_lambert_Wm1_e(C.double(x), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func EcompE(k float64, mode sf.GslMode, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_ellint_Ecomp_e(C.double(k), C.gsl_mode_t(mode), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func DE(phi float64, k float64, n float64, mode sf.GslMode, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_ellint_D_e(C.double(phi), C.double(k), C.double(n), C.gsl_mode_t(mode), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func CLE(l float64, eta float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_coulomb_CL_e(C.double(l), C.double(eta), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func WaveFGE(eta float64, x float64, lF float64, k int32, f *sf.GslSfResult, fp *sf.GslSfResult, g *sf.GslSfResult, gp *sf.GslSfResult, expF []float64, expG []float64) int32 { _slice_header_8 := (*reflect.SliceHeader)(unsafe.Pointer(&expF)) _slice_header_9 := (*reflect.SliceHeader)(unsafe.Pointer(&expG)) return int32(C.gsl_sf_coulomb_wave_FG_e(C.double(eta), C.double(x), C.double(lF), C.int(k), (*C.gsl_sf_result)(unsafe.Pointer(f.Ptr())), (*C.gsl_sf_result)(unsafe.Pointer(fp.Ptr())), (*C.gsl_sf_result)(unsafe.Pointer(g.Ptr())), (*C.gsl_sf_result)(unsafe.Pointer(gp.Ptr())), (*C.double)(unsafe.Pointer(_slice_header_8.Data)), (*C.double)(unsafe.Pointer(_slice_header_9.Data)))) }
func HydrogenicRE(n int32, l int32, z float64, r float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_hydrogenicR_e(C.int(n), C.int(l), C.double(z), C.double(r), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func TaylorcoeffE(n int32, x float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_taylorcoeff_e(C.int(n), C.double(x), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func HypotE(x float64, y float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_hypot_e(C.double(x), C.double(y), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func LnpochSgnE(a float64, x float64, result *sf.GslSfResult) (int32, float64) { var _outptr_3 C.double _result := int32(C.gsl_sf_lnpoch_sgn_e(C.double(a), C.double(x), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())), &_outptr_3)) return _result, *(*float64)(unsafe.Pointer(&_outptr_3)) }
func ComplexCosE(zr float64, zi float64, czr *sf.GslSfResult, czi *sf.GslSfResult) int32 { return int32(C.gsl_sf_complex_cos_e(C.double(zr), C.double(zi), (*C.gsl_sf_result)(unsafe.Pointer(czr.Ptr())), (*C.gsl_sf_result)(unsafe.Pointer(czi.Ptr())))) }
func GammaIncPE(a float64, x float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_gamma_inc_P_e(C.double(a), C.double(x), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func ComplexLogsinE(zr float64, zi float64, lszr *sf.GslSfResult, lszi *sf.GslSfResult) int32 { return int32(C.gsl_sf_complex_logsin_e(C.double(zr), C.double(zi), (*C.gsl_sf_result)(unsafe.Pointer(lszr.Ptr())), (*C.gsl_sf_result)(unsafe.Pointer(lszi.Ptr())))) }
func BetaIncE(a float64, b float64, x float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_beta_inc_e(C.double(a), C.double(b), C.double(x), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func LncoshE(x float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_lncosh_e(C.double(x), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func GammainvE(x float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_gammainv_e(C.double(x), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func PolarToRect(r float64, theta float64, x *sf.GslSfResult, y *sf.GslSfResult) int32 { return int32(C.gsl_sf_polar_to_rect(C.double(r), C.double(theta), (*C.gsl_sf_result)(unsafe.Pointer(x.Ptr())), (*C.gsl_sf_result)(unsafe.Pointer(y.Ptr())))) }
func LndoublefactE(n uint32, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_lndoublefact_e(C.uint(n), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func RectToPolar(x float64, y float64, r *sf.GslSfResult, theta *sf.GslSfResult) int32 { return int32(C.gsl_sf_rect_to_polar(C.double(x), C.double(y), (*C.gsl_sf_result)(unsafe.Pointer(r.Ptr())), (*C.gsl_sf_result)(unsafe.Pointer(theta.Ptr())))) }
func GegenpolyNE(n int32, lambda float64, x float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_gegenpoly_n_e(C.int(n), C.double(lambda), C.double(x), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func CosErrE(x float64, dx float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_cos_err_e(C.double(x), C.double(dx), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func PowIntE(x float64, n int32, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_pow_int_e(C.double(x), C.int(n), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }
func AtanintE(x float64, result *sf.GslSfResult) int32 { return int32(C.gsl_sf_atanint_e(C.double(x), (*C.gsl_sf_result)(unsafe.Pointer(result.Ptr())))) }