Beispiel #1
0
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")
	}
}
Beispiel #2
0
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()))))
}
Beispiel #3
0
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()))))
}
Beispiel #4
0
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))
}
Beispiel #5
0
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()))))
}
Beispiel #6
0
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()))))
}
Beispiel #7
0
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()))))
}
Beispiel #8
0
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()))))
}
Beispiel #9
0
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()))))
}
Beispiel #10
0
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()))))
}
Beispiel #11
0
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()))))
}
Beispiel #12
0
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()))))
}
Beispiel #13
0
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))))
}
Beispiel #14
0
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()))))
}
Beispiel #15
0
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()))))
}
Beispiel #16
0
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()))))
}
Beispiel #17
0
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))
}
Beispiel #18
0
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()))))
}
Beispiel #19
0
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()))))
}
Beispiel #20
0
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()))))
}
Beispiel #21
0
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()))))
}
Beispiel #22
0
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()))))
}
Beispiel #23
0
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()))))
}
Beispiel #24
0
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()))))
}
Beispiel #25
0
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()))))
}
Beispiel #26
0
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()))))
}
Beispiel #27
0
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()))))
}
Beispiel #28
0
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()))))
}
Beispiel #29
0
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()))))
}
Beispiel #30
0
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()))))
}