Re: [racket-users] range with small or zero step doesn't return

2017-04-17 Thread Alex Harsanyi
On Tuesday, April 18, 2017 at 5:15:12 AM UTC+8, Jens Axel Søgaard wrote: > 2017-04-17 22:56 GMT+02:00 Vincent St-Amour : > (For people following along, the issue is that there exists a value `x` > > such that `(= (+ x 1e-17) x)`, and that the iteration reaches that `x` > > as its state at some po

Re: [racket-users] range with small or zero step doesn't return

2017-04-17 Thread Vincent St-Amour
I agree. I'll add a note to the docs. Vincent On Mon, 17 Apr 2017 16:16:49 -0500, Tim Jervis wrote: > > I like the document route; anyone who is happy with the performance tradeoff > would be free to implement a more conservative version. > > On 17 Apr 2017, at 21:59, Ben Greenman wrote: >

Re: [racket-users] range with small or zero step doesn't return

2017-04-17 Thread Tim Jervis
I like the document route; anyone who is happy with the performance tradeoff would be free to implement a more conservative version. > On 17 Apr 2017, at 21:59, Ben Greenman wrote: > > Maybe, just add a note to the docs? > >> On Mon, Apr 17, 2017 at 4:56 PM, Vincent St-Amour >> wrote: >> The

Re: [racket-users] range with small or zero step doesn't return

2017-04-17 Thread Jens Axel Søgaard
2017-04-17 22:56 GMT+02:00 Vincent St-Amour : > (For people following along, the issue is that there exists a value `x` > such that `(= (+ x 1e-17) x)`, and that the iteration reaches that `x` > as its state at some point, then loops.) > What is the smallest y such that no x exists such that (=

Re: [racket-users] range with small or zero step doesn't return

2017-04-17 Thread Ben Greenman
Maybe, just add a note to the docs? On Mon, Apr 17, 2017 at 4:56 PM, Vincent St-Amour < stamo...@eecs.northwestern.edu> wrote: > The latter is easy to fix; I've submitted a pull request. > > The former is trickier. The problem is not so much due to the step size > itself, but rather to a combinat

Re: [racket-users] range with small or zero step doesn't return

2017-04-17 Thread Vincent St-Amour
The latter is easy to fix; I've submitted a pull request. The former is trickier. The problem is not so much due to the step size itself, but rather to a combination of the step size and of a particular iteration state. (For people following along, the issue is that there exists a value `x` such

[racket-users] range with small or zero step doesn't return

2017-04-17 Thread Tim Jervis
Dear Racket Users, I’ve noticed the following procedure calls don’t return (on my 64 bit Mac hardware): (range (- 1 1e-16) 1.0 1e-17) (range 0 1 0) While (2) is obvious, (1) tripped me up (as I hadn’t noticed my step size had fallen to effectively zero). A small tweak to for.rkt in the racket