unifies the first argument with the value of the second argument. ...
Move to
=> <=
Darueber Spitze
See also
for/3
is/2
IF Computer > MINERVA > Manual > Reference > Predicates > Arithmetic evaluation > is/2

is/2

unifies the first argument with the value of the second argument.

?Result is +Expression

is/2 evaluates Expression and unifies Result with the resulting value.

is/2 is a predefined infix-operator. Its priority is 700 and it is non-associative (see also current_op/3).

Arguments

Result                 number
Expression             evaluable 

Possible arguments are the following functors or operations:

(the type-representations are:
'F' means 'only floating point number'
'R' means 'floating point number or integer'
'I' means 'integer'

Functor or operation Type of result description
- F F negates a number.
- I I negates a number.
F - R F subtracts the second argument from the first one
R - F F subtracts the second argument from the first one
I - I I subtracts the second argument from the first one
F + R F adds two numbers
R + F F adds two numbers
I + I I adds two numbers
R / R F divides the first argument through the second argument
I // I I divides the first argument through the second argument
R * F F multiplies two numbers
F * R F multiplies two numbers
I * I I multiplies two numbers
abs(F) F absolute value of a number
abs(I) I absolute value of a number
acos(R) F arcus cosinus of a number
asin(R) F arcus sinus of a number
atan(R) F arcus tangens of a number
ceil(R) I rounds a number up
ceiling(R) I rounds a number up (same as ceil)
cos(R) F cosinus
exp(R) F exponential function of a number
floor(R) I rounds a number off
log(F) F natural logarithm of a number
max(R,R) R maximum of two numbers
min(R,R) R minimum of two numbers
I mod I I first argument modulo second argument
R ** R R first argument power second argument (same as pow)
pow(R,R) R first argument power second argument
round(R) I rounds a number
sin(R) F sinus of a number
sqrt(R) F square-root of a number
tan(R) F tangens of a number
I << I I bitwise shift left
I >> I I bitwise shift right
\ I I bitwise complement
I >>> I I unsigned bitwise shift right

Examples

X is 15 * 2. Succeeds with substitution X <- 30.
Y is 17.5 - 2. Succeeds with substitution Y <- 15.5.
5.0 is 5. Fails.
X is Y+4. instantiation_error.

Standard

This predicate is part of the ISO-Prolog Standard.

See also

arithmetic comparison.

read on...
MINERVA
ifcomputer logo
f
Expert Services on the Web
Sprache
English
Japanese
Server
USA
Japan
Site Access
Local Index
Local Contents
Site Contents
Site Index
Printer Friendly
For imode
For PDA
Search
document: http://www.ifcomputer.co.jp/MINERVA/Manual/Reference/Predicates/arithm_eval/is/home_de.html
published 2008/7/21 update 2003/2/26 (c) 1996-2006 IF Computer Japan
IF Computer 5-28-2 Sendagi, Bunkyo-ku Tel +81-3-5814-3352 info@ifcomputer.com
Customer Support Tokyo 113-0022 Japan   http://www.ifcomputer.com
scroll to top managed with ubiCMS