0

Does Ruby distinguish between floats and doubles?

I am working on something that fetches user input but the number may be too big for float. The function for fetching floating points I have come across thus far is gets.to_f. Is there a function for doubles or does Ruby handle this automatically?

2nd Jul 2017, 9:01 AM
William Moonga
William Moonga - avatar
2 Respostas
0
Ruby does not have a 'double' type number like c# It only has float. Also, you don't need to worry about precision, ruby will handle automatically.
2nd Jul 2017, 12:30 PM
Salekin
Salekin - avatar
0
Noted with thanks.
2nd Jul 2017, 1:36 PM
William Moonga
William Moonga - avatar