0.81986932 is not a valid float -- the next smallest one is 0.81986930, so the one you were given is the closest that can be rounded to.
Try (Math/nextUp x) and (Math/nextDown x) to see what floats are possible. On Saturday, December 15, 2018 at 4:21:05 PM UTC-6, ru wrote: > > I have to use float in one application. > I just thought that a reasonable implementation of the float function > could use the rounding we were used to, that is, (float > 0.819869321599107) = 0.81986932 > > суббота, 15 декабря 2018 г., 21:10:54 UTC+3 пользователь ru написал: >> >> Dear Clojure users and team! >> >> Please explain me this result: >> >> Ruslans-iMac:clojure ru$ lein repl >> >> nREPL server started on port 54147 on host 127.0.0.1 - nrepl:// >> 127.0.0.1:54147 >> >> REPL-y 0.3.7, nREPL 0.2.12 >> >> Clojure 1.8.0 >> >> Java HotSpot(TM) 64-Bit Server VM 11.0.1+13-LTS >> >> Docs: (doc function-name-here) >> >> (find-doc "part-of-name-here") >> >> Source: (source function-name-here) >> >> Javadoc: (javadoc java-object-or-class-here) >> >> Exit: Control+D or (exit) or (quit) >> >> Results: Stored in vars *1, *2, *3, an exception in *e >> >> >> user=> (float 0.819869321599107) >> >> 0.81986934 >> >> user=> >> >> >> Thanks in advance. >> >> >> Sincerely, >> >> Ru >> > -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.