util Tool Function – RationalNumber
Introduction
This sample shows how to use the RationalNumber function in the util class for rational number operations.
Usage
-
Touch Compare rational numbers to compare two rational numbers. The comparison result is displayed in the text box.
-
Touch Get rational number value. The integer or floating point value of the first rational number is displayed in the text box.
-
Touch Get numerator and denominator. The numerator and denominator of the rational number are displayed in the text box.
-
Touch Check for zero to check whether the rational number is 0. The check result is displayed in the text box.
-
Touch Check for NaN to check whether the rational number is Not a Number (NaN). The check result is displayed in the text box.
-
Touch Check for finite number to check whether the rational number is a finite number. The check result is displayed in the text box.
Constraints
This sample can only be run on standard-system devices.