Name

assert_asincond — Computes the condition number of the asin function.

Calling Sequence

   [c,y] = assert_asincond ( 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 asin function. The asin function has a large condition number if

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

<latex> \begin{eqnarray} c(x) = \left| \frac{x}{\sqrt{1-x^2}\arcsin(x)} \right| \end{eqnarray} </latex>

Examples

[c,y] = assert_asincond ( 0 )         // 1
[c,y] = assert_asincond ( 0.5 )       // c~1
[c,y] = assert_asincond ( 1-%eps/2 )  // c~10^7
[c,y] = assert_asincond ( -1+%eps/2 ) // c~10^7
[c,y] = assert_asincond ( 1 )         // %inf
[c,y] = assert_asincond ( -1 )        // %inf

// Vectorized call
assert_asincond ( [0 0.1 0.2 0.5] )

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

   

Authors

Michael Baudin, DIGITEO, 2010