Re: range with decimal values

2010-12-04 Thread mch
On Dec 4, 7:42 am, Glen Rubin wrote: > (range 0.05 0.16 0.01) > > user> (0.05 0.060005 0.07 0.08 0.09 0.0 > 0.10999 0.11998 0.12998 > 0.13999 0.15) You are seeing an artifact of the fact that floating point numbers canno

Re: range with decimal values

2010-12-04 Thread Phlex
You're not playing with decimal values but rather with floating point numbers. user> (type 0.1) java.lang.Double Floating point numbers have well known rounding errors when converting to decimal. http://en.wikipedia.org/wiki/Floating_point#Accuracy_problems you might want to use actual decim

Re: range with decimal values

2010-12-04 Thread Michael Gardner
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.060005 0.07 0.08 0.09 0.0 > 0.10999 0.11998 0.12998

range with decimal values

2010-12-04 Thread Glen Rubin
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.060005 0.07 0.08 0.09 0.0 0.10999 0.11998 0.12998 0.13999 0.15) Really I want output more like i g