File: asin.sci

package info (click to toggle)
scilab 2.6-4
  • links: PTS
  • area: non-free
  • in suites: woody
  • size: 54,632 kB
  • ctags: 40,267
  • sloc: ansic: 267,851; fortran: 166,549; sh: 10,005; makefile: 4,119; tcl: 1,070; cpp: 233; csh: 143; asm: 135; perl: 130; java: 39
file content (15 lines) | stat: -rw-r--r-- 399 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
function t=asin(x)
//Eelemt wize Sine-inverse of x
//Entries of vector x must be in [-1,+1]
//Entries of t are in    ]-pi/2,pi/2[ x ]-inf,+inf[
//                   -pi/2 x [0,+inf] and pi/2 x ]-inf,0] (real x imag)
//
//!
// Copyright INRIA
if type(x)<>1 then error(53),end
if x==[] then t=[],return,end
t=-%i*log(%i*x+sqrt(ones(x)-x.*x))
if norm(imag(x))==0&maxi(abs(x))<=1 then  t=real(t);end