Doing a floating unit without installing additional gems?
Let's say I have these two floats:
a = 50.0
b = 1048576.0
c = a/b
c
When I print it out , I get the following:
4.76837158203125e-005
Doing division with calc.exe
gives me the result 0.0000476837158203125. Is there a way to achieve the same with Ruby without installing any additional gems?
+2
a source to share