windows 10, emacs 26.1
*scratch* buffer and do next:
(/ 15 6) press
Result is in minibuffer:
2 (#o2, #x2, ?\C-b)
As you can see the result is INTEGER value. But I need correct value = 2.5
How I can do this?
Emacs Stack Exchange is a question and answer site for those using, extending or developing Emacs. It only takes a minute to sign up.Sign up to join this community
Assuming you're happy with floating point arithmetic then you just need to make one of the numbers a float. e.g.:
(/ 15.0 6) => 2.5
Refer to C-hig
each of these functions accepts both integer and floating-point arguments, and returns a floating-point number if any argument is floating point.