Name

condnb_sincond — Computes the condition number of the sin function.

Calling Sequence

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

  • x is large,
  • x is an integer multiple of pi (where sin(x)=0).

Examples

[c,y] = condnb_sincond ( 1 )
c = condnb_sincond ( 0 ) // c = 1

// http://bugzilla.scilab.org/show_bug.cgi?id=5738
[c,y] = condnb_sincond ( %pi )
245850922/78256779 == %pi
// XCAS : evalf(sin(245850922/78256779),50)
expected = 0.781793661990754354001e-16

condnb_plotcond ( "sin" , linspace(-4,4,1000) );

   

Authors

Michael Baudin, DIGITEO, 2010