Please ensure Javascript is enabled for purposes of website accessibility
Powered by Zoomin Software. For more details please contactZoomin

Analytics and Notifications for PI System Explorer (PI Server 2018)

Remainder

  • Last UpdatedJan 11, 2023
  • 1 minute read

Return the remainder resulting from the division of x by y using the IEEERemainder method. This remainder is equal to x - (y Q), where Q is the quotient of x / y rounded to the nearest integer (if x / y falls halfway between two integers, the even integer is returned). If x - (y Q) is zero, the value +0 is returned if x is positive, or -0 if x is negative. If y = 0, NaN (not a number) is returned.

Syntax

Remainder(x, y)

Arguments

  • x

    Any numeric value

  • y

    Any non-zero numeric value

Returns

Return the remainder resulting from the division of x by y using the IEEERemainder method

Note: This is not the same as the remainder returned using the Mod (modulus) operator

Exceptions

None

Notes

Unit of measure of x, if it exists, is carried over to the result

Example

  • Remainder(11, 3)

    [Returns -1]

  • Remainder(10, 3)

    [Returns 1]

In This Topic
TitleResults for “How to create a CRG?”Also Available in