~ubuntu-branches/ubuntu/karmic/scilab/karmic

« back to all changes in this revision

Viewing changes to macros/elem/asin.sci

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2002-03-21 16:57:43 UTC
  • Revision ID: james.westby@ubuntu.com-20020321165743-e9mv12c1tb1plztg
Tags: upstream-2.6
ImportĀ upstreamĀ versionĀ 2.6

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
function t=asin(x)
 
2
//Eelemt wize Sine-inverse of x
 
3
//Entries of vector x must be in [-1,+1]
 
4
//Entries of t are in    ]-pi/2,pi/2[ x ]-inf,+inf[
 
5
//                   -pi/2 x [0,+inf] and pi/2 x ]-inf,0] (real x imag)
 
6
//
 
7
//!
 
8
// Copyright INRIA
 
9
if type(x)<>1 then error(53),end
 
10
if x==[] then t=[],return,end
 
11
t=-%i*log(%i*x+sqrt(ones(x)-x.*x))
 
12
if norm(imag(x))==0&maxi(abs(x))<=1 then  t=real(t);end
 
13
 
 
14
 
 
15