DriftTexture · function
erf
The error function, to double precision.
Explained in DriftTexture.
function erf(x: number): numberimport { erf } from '@driftengine/texture';Parameters
| Parameter | Type | Description |
|---|---|---|
x | number |
In depth
A Maclaurin series below 3, where its alternating terms peak near 170 at x = 3 and cost about
three digits to cancellation — still 1e-13; a continued fraction for the complement above, which
converges fastest exactly where the series is worst; and ±1 past 6, where the complement is below
a double's last place.