Company Events Academic NI Developer Zone Support Solutions Products & Services Contact NI MyNI

Quotient & Remainder

LabVIEW 8.2 Help
August 2006

NI Part Number:
371361B-01

»View Product Info

Computes the integer quotient and the remainder of the inputs. The connector pane displays the default data types for this polymorphic function. Details  Example

x can be a scalar number, array or cluster of numbers, array of clusters of numbers, and so on.
y can be a scalar number, array or cluster of numbers, array of clusters of numbers, and so on.
x-y*floor(x/y) is the remainder. This corresponds to the modulo function of text-based programming languages. When y is 1, the remainder is the fractional part of x.
floor(x/y) is the integer quotient. If either input is a floating-point number, the quotient is a floating-point number with an integer value. When y is 1, the quotient is the integer part of x.

Quotient & Remainder Details

If the integer input value of y is zero, the quotient is zero and remainder is dividend x. For floating-point inputs, if y is zero, the quotient is infinity and the remainder defaults to NaN.

Example

Refer to the Quotient and Remainder VI in the labview\examples\general\functions\Numeric directory for an example of using the Quotient & Remainder function.

 


Resources


 

Your Feedback! poor Poor  |  Excellent excellent   Yes No
 Document Quality? 
 Answered Your Question? 
Add Comments 1 2 3 4 5 submit