.ModelicaReference.Operators.'rem()'

Information

Integer remainder of the division of two Real numbers

Syntax

rem(x, y)

Description

Returns the integer remainder of x/y, such that div(x,y) * y + rem(x, y) = x. Result and arguments shall have type Real or Integer. If either of the arguments is Real the result is Real otherwise Integer. [Note, outside of a when clause state events are triggered when the return value changes discontinuously.]

Examples

rem(3,1.4)
 = 0.2
rem(-3,1.4)
 = -0.2
rem(3,-1.4)
 = 0.2

Generated at 2019-09-15T01:38:28Z by OpenModelicaOpenModelica 1.14.0~dev-26728-gbf603de using GenerateDoc.mos