3 ms·
I think there is also a gotcha there as you get a ratio in Common Lisp and not a floating point number. > (print (format t "1 divided by 2 is ~a and its type i
by bhaak 2y ago
I think there is also a gotcha there as you get a ratio in Common Lisp and not a floating point number.
> (print (format t "1 divided by 2 is ~a and its type is ~a" (/ 1 2) (type-of (/ 1 2))))
> 1 divided by 2 is 1/2 and its type is RATIO
I don't think there is a simple solution. Numbers are harder than they seem and you just need to know what happens in the particular language you are programming in.
- regularfry 2y agoArguably that's not a gotcha. It's (probably) his point.