~ubuntu-branches/ubuntu/hoary/scilab/hoary

« back to all changes in this revision

Viewing changes to man/elementary/rat.cat

  • Committer: Bazaar Package Importer
  • Author(s): Torsten Werner
  • Date: 2005-01-09 22:58:21 UTC
  • mfrom: (1.1.1 upstream)
  • Revision ID: james.westby@ubuntu.com-20050109225821-473xr8vhgugxxx5j
Tags: 3.0-12
changed configure.in to build scilab's own malloc.o, closes: #255869

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
rat              Scilab Group              Scilab Function              rat
2
 
NAME
3
 
   rat - Floating point rational approximation 
4
 
  
5
 
CALLING SEQUENCE
6
 
 [N,D]=rat(x [,tol])
7
 
 y=rat(x [,tol])
8
 
PARAMETERS
9
 
 x          : real  vector or matrix
10
 
            
11
 
 n          : integer vector or matrix 
12
 
            
13
 
 d          : integer vector or matrix 
14
 
            
15
 
 y          : real vector or matrix 
16
 
            
17
 
DESCRIPTION
18
 
   [N,D] = rat(x,tol) returns two integer matrices so that N./D is close tox
19
 
  in the sense that abs(N./D - X) <= tol*abs(x). The rational
20
 
  approximations are generated by truncating continued fraction expansions.
21
 
     tol = 1.e-6*norm(X,1) is the default. y = rat(x,tol) return the
22
 
  quotient N./D 
23
 
  
24
 
SEE ALSO
25
 
   int, round
26
 
  
27
 
EXAMPLES
28
 
 [n,d]=rat(%pi)
29
 
 [n,d]=rat(%pi,1.d-12)
30
 
 n/d-%pi