Scilab Home page | Wiki | Bug tracker | Forge | Mailing list archives | ATOMS | File exchange
Please login or create an account
Change language to: English - Français - Português - Русский

Please note that the recommended version of Scilab is 6.0.1. This page might be outdated.
See the recommended documentation of this function

Scilab help >> Elementary Functions > modulo

modulo

対称剰余モジュロm演算

pmodulo

正の剰余モジュロm演算

呼出し手順

i=modulo(n,m)
i=pmodulo(n,m)

パラメータ

n,m

整数

説明

modulo は, i= n (modulo m), すなわち, nmで 割った剰余を計算します(n および m は整数).

i = n - m .* int (n ./ m). ここで, n または mが負の場合, 答えが負となる可能性があります.

pmoduloi = n - m .* floor (n ./ m) を計算します, 答えは正またはゼロとなります.

n=[1,2,10,15];m=[2,2,3,5];
modulo(n,m)

modulo(-3,9)
pmodulo(-3,9)
Scilab Enterprises
Copyright (c) 2011-2017 (Scilab Enterprises)
Copyright (c) 1989-2012 (INRIA)
Copyright (c) 1989-2007 (ENPC)
with contributors
Last updated:
Mon Oct 01 17:40:24 CEST 2012