# util Tool Function – RationalNumber ### Introduction This sample shows how to use the **RationalNumber** function in the **util** class for rational number operations. ### Usage 1. Touch **Compare rational numbers** to compare two rational numbers. The comparison result is displayed in the text box. 2. Touch **Get rational number value**. The integer or floating point value of the first rational number is displayed in the text box. 3. Touch **Get numerator and denominator**. The numerator and denominator of the rational number are displayed in the text box. 4. Touch **Check for zero** to check whether the rational number is **0**. The check result is displayed in the text box. 5. Touch **Check for NaN** to check whether the rational number is Not a Number (NaN). The check result is displayed in the text box. 6. 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.