![]() |
Float rationalize() is a float class method which return the simple rational form (p/q) of a float value.
Example #1:
Output : Rationalizing a : 767/1000 Rationalizing b : 2999011/1000 Example #2:
Output : Rationalizing a : 10/13 Rationalizing b : 1634461/545 Rationalizing c : 2/1 |
Reffered: https://www.geeksforgeeks.org
Ruby |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 9 |