Ejemplo n.º 1
0
func Qags(f F, a, b float64, epsabs, epsrel float64, limit int) (result, abserr float64, status int) {
	wf := C.wrapper_function(unsafe.Pointer(&f))
	r := C.qags(wf, C.double(a), C.double(b), C.double(epsabs), C.double(epsrel), C.size_t(limit))
	result = float64(r.result)
	abserr = float64(r.abserr)
	status = int(r.status)
	return
}
Ejemplo n.º 2
0
func Qng(f F, a, b, epsabs, epsrel float64) (result, abserr float64, neval, status int) {
	wf := C.wrapper_function(unsafe.Pointer(&f))
	r := C.qng(wf, C.double(a), C.double(b), C.double(epsabs), C.double(epsrel))
	result = float64(r.result)
	abserr = float64(r.abserr)
	status = int(r.status)
	neval = int(r.neval)
	return
}
Ejemplo n.º 3
0
func Qk(f F, a, b float64, key int) (result, abserr, resabs, resasc float64) {
	wf := C.wrapper_function(unsafe.Pointer(&f))

	r := C.qk(wf, C.int(key), C.double(a), C.double(b))
	result = float64(r.result)
	abserr = float64(r.abserr)
	resabs = float64(r.resabs)
	resasc = float64(r.resasc)
	return
}