timmstelzer
2018-5-7 09:29:29

Hey there, I need a range of numbers between 0.1 to 0.9, with 0.1 steps; so I attempted (range 0.1 0.9 0.1), but that gives me '(0.1 0.2 0.30000000000000004 0.4 0.5 0.6 0.7 0.7999999999999999 0.8999999999999999); I expected to get '(0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9) — what am I doing wrong? /edit: figured it out, I have to mind if I’m using exact or inexact


samth
2018-5-7 12:44:51

@andreiformiga you might also be interested in ~r from racket/format


andreiformiga
2018-5-7 15:35:15

racket/format is good, I guess I had seen ~a used before but didn’t notice what it was


dedbox
2018-5-7 16:56:17

Nice, I’d never seen ~r. It doesn’t get much easier than that.


ghoetker
2018-5-8 06:03:28

@ghoetker has joined the channel