Name

assert_erfinvcond — Computes the condition number of the erfinv function.

Calling Sequence

   [c,y] = assert_erfinvcond ( x )
   
   

Parameters

x :

a n-by-m matrix of doubles

c :

a n-by-m matrix of doubles, the condition number

y :

a n-by-m, matrix of doubles, the function values

Description

Computes the condition number of the erfinv function. The erfinv function has a large condition number if

  • x is close to 1,
  • x is close to -1.

<latex> \begin{eqnarray} c(x) = \frac{\sqrt{\pi}}{2} \exp(y^2) \left| \frac{x}{f(x)} \right| \end{eqnarray} </latex>

where

<latex> \begin{eqnarray} f(x) = \mbox{erfinv}(x) \end{eqnarray} </latex>

Examples

[c,y] = assert_erfinvcond ( 0 ) // 1
[c,y] = assert_erfinvcond ( 0.5 )
[c,y] = assert_erfinvcond ( 1.e2 )

assert_plotcond ( "erfinv" , linspace(-1,1,1000) );

   

Authors

Michael Baudin, DIGITEO, 2010