On Dec 4, 2010, at 8:42 AM, Glen Rubin wrote: > If I use the range fn with a decimal number for step I get back > something like this: > > (range 0.05 0.16 0.01) > > user> (0.05 0.060000000000000005 0.07 0.08 0.09 0.09999999999999999 > 0.10999999999999999 0.11999999999999998 0.12999999999999998 > 0.13999999999999999 0.15) > > Really I want output more like i get from the following fn: > > (map float (range 5/100 16/100 1/100)) > > user> (0.05 0.06 0.07 0.08 0.09 0.1 0.11 0.12 0.13 0.14 0.15)
Perhaps (map (partial * 0.01) (range 5 16))? -- 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