SciDart
Special functions
Error functions and the modified Bessel function of order zero.
Like scipy.special
import 'package:scidart/scidart.dart';
void main() {
print('erf(0.5) = ${erf(0.5)}');
print('erfc(3) = ${erfc(3)}');
// erfc keeps precision deep in the tail
print('erfc(26.6) = ${erfc(26.6)}');
print('I0(1) = ${besselI0(1)}');
}
Output
erf(0.5) = 0.5204998778130465 erfc(3) = 0.000022090496998585438 erfc(26.6) = 1.088512588544237e-309 I0(1) = 1.2660658480342601
erfanderfcuse W. J. Cody's rational approximations and agree withscipy.specialto about 1e-14 relative error.erfckeeps relative precision far into the tail, down to subnormal results.besselI0is the modified Bessel function of the first kind and order zero, used by the Kaiser window.- Array versions:
arrayErf,arrayErfc,arrayBesselI0.