1# util Tool Function – RationalNumber 2 3### Introduction 4 5This sample shows how to use the **RationalNumber** function in the **util** class for rational number operations. 6 7### Usage 8 91. Touch **Compare rational numbers** to compare two rational numbers. The comparison result is displayed in the text box. 10 112. Touch **Get rational number value**. The integer or floating point value of the first rational number is displayed in the text box. 12 133. Touch **Get numerator and denominator**. The numerator and denominator of the rational number are displayed in the text box. 14 154. Touch **Check for zero** to check whether the rational number is **0**. The check result is displayed in the text box. 16 175. Touch **Check for NaN** to check whether the rational number is Not a Number (NaN). The check result is displayed in the text box. 18 196. Touch **Check for finite number** to check whether the rational number is a finite number. The check result is displayed in the text box. 20 21### Constraints 22 23This sample can only be run on standard-system devices. 24