# erfcinv > [Inverse complementary error function][erfcinv].
The [inverse complementary error function][erfcinv] is defined as
Inverse complementary error function.
where `erf^{-1}(z)` is the [inverse error function][@stdlib/math/base/special/erfinv].
## Usage ```javascript var erfcinv = require( '@stdlib/math/base/special/erfcinv' ); ``` #### erfcinv( x ) Evaluates the [inverse complementary error function][erfcinv]. ```javascript var y = erfcinv( 0.5 ); // returns ~0.4769 y = erfcinv( 0.8 ); // returns ~0.1791 y = erfcinv( 0.0 ); // returns Infinity y = erfcinv( 2.0 ); // returns -Infinity ``` The domain of `x` is restricted to `[0,2]`. If `x` is outside this interval, the function returns `NaN`. ```javascript var y = erfcinv( -3.14 ); // returns NaN ``` If provided `NaN`, the function returns `NaN`. ```javascript var y = erfcinv( NaN ); // returns NaN ```
## Examples ```javascript var linspace = require( '@stdlib/array/linspace' ); var erfcinv = require( '@stdlib/math/base/special/erfcinv' ); var x = linspace( 0.0, 2.0, 100 ); var y; var i; for ( i = 0; i < x.length; i++ ) { y = erfcinv( x[ i ] ); console.log( 'x: %d, erfcinv(x): %d', x[ i ], y ); } ```