6 numerical conditions – HYDAC CSI-F-10 User Manual

Page 97

Advertising
background image

GSM Radio Module CSI-F-10

Page 97

Status 29.01.2009

HYDAC ELECTRONIC GMBH

Part.-Nr.:

669752

9.6 Numerical Conditions

9.6.1 Equals

The Equals function compares two numerical input values for
equivalence and outputs a "1" at its Boolean output if the values are
equivalent, otherwise a "0".

With the Precision parameter, you can adjust how precise the
comparison is. For this the following explanation:

In view of the fact that numerical values are presented on computers
as floating point numbers with finite precision, normal comparisons
usually fail. Thus, for example, the finite precision of 2/6 is not
necessarily the same as the result of 1/3. The difference goes to 8
decimal places, but nonetheless the two values are not recognized
as being equivalent.

The point at which one needs to break off the comparison of
numbers varies from case to case. It is for that reason that you have
the option of controlling the precision of the comparison.

If you specify 0.01 for precision, for example, then the numbers
12.453 and 12.458 will still be recognized as equivalents to one
another, because the difference is less than 0.01.

Inputs: x

1

: (Numerical)

x

2

: (Numerical)

Outputs: y:

(Boolean)

Parameters: p

1

:

Precision

(Numerical)


9.6.2 Does not Equal

The Does not equal function compares two numerical input values
and outputs a "1" at its Boolean output if the values are not equal,
otherwise a "0".

For the Precision parameter, see the explanation in the Equals
function (Chapter 9.6.1).

Inputs: x

1

: (Numerical)

x

2

: (Numerical)

Outputs: y:

(Boolean)

Parameters: p

1

:

Precision

(Numerical)


Advertising