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

« back to all changes in this revision

Viewing changes to man/elementary/modulo.man

  • 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
 
.TH modulo 1 "April 1993" "Scilab Group" "Scilab Function"
2
 
.so ../sci.an
3
 
.SH NAME
4
 
modulo - symetric arithmetic remainder modulo m
5
 
pmodulo - positive arithmetic remainder modulo m
6
 
.SH CALLING SEQUENCE
7
 
.nf
8
 
i=modulo(n,m)
9
 
i=pmodulo(n,m)
10
 
.fi
11
 
.SH PARAMETERS
12
 
n,m:
13
 
integers
14
 
.SH DESCRIPTION
15
 
\fVmodulo\fR computes \fVi= n (modulo m)\fR i.e. remainder
16
 
of \fVn\fR divided by \fVm\fR (\fVn\fR and \fVm\fR integers).
17
 
.LP
18
 
 
19
 
 i = n - m .* int (n ./ m). Here the answer may be negative if \fVn\fR  or \fVm\fR 
20
 
are negative.
21
 
.LP
22
 
\fVpmodulo\fR computes  \fVi = n - m .* floor (n ./ m)\fR, the answer
23
 
is positive or zero
24
 
 
25
 
 
26
 
.SH EXAMPLE
27
 
.nf
28
 
n=[1,2,10,15];m=[2,2,3,5];
29
 
modulo(n,m)
30
 
 
31
 
modulo(-3,9)
32
 
pmodulo(-3,9)
33
 
.fi
34