Re: [racket-users] confusion about real vs not real zero

2021-11-19 Thread Alain De Vos
Check if the distance from (0,0) is "small enough" ? On Friday, November 19, 2021 at 9:32:23 PM UTC+1 Stephen Chang wrote: > I dont want to fully support complex numbers. I just want to do the > minimum so that programs that dont use them are not blocked by the > lack of support > > On Fri, Nov

Re: [racket-users] confusion about real vs not real zero

2021-11-19 Thread Stephen Chang
I dont want to fully support complex numbers. I just want to do the minimum so that programs that dont use them are not blocked by the lack of support On Fri, Nov 19, 2021 at 3:30 PM Sorawee Porncharoenwase wrote: > > Yeah, I was about to reply that I don't think there's a workaround, too. > >

Re: [racket-users] confusion about real vs not real zero

2021-11-19 Thread Sorawee Porncharoenwase
Yeah, I was about to reply that I don't think there's a workaround, too. What is your goal, though? Do you intend to support complex numbers properly right now? In particular, that problematic code is random generation from contracts, which is rarely invoked anyway. Intuitively, there's no reason

Re: [racket-users] confusion about real vs not real zero

2021-11-19 Thread Stephen Chang
Sorry, the "workaround" was in regard to complex numbers. How to support them in a minimal way so that programs that dont use them are not blocked by lack of full support. On Fri, Nov 19, 2021 at 3:20 PM Sam Tobin-Hochstadt wrote: > > On Fri, Nov 19, 2021 at 3:13 PM Stephen Chang wrote: > > > >

Re: [racket-users] confusion about real vs not real zero

2021-11-19 Thread Stephen Chang
Lol I read that page and still didn't get it. Any opinion for a potential workaround? On Fri, Nov 19, 2021 at 3:08 PM Sorawee Porncharoenwase wrote: > > I had this exact same question when I looked at the RacketScript issue lol. > > The answer is

Re: [racket-users] confusion about real vs not real zero

2021-11-19 Thread Sorawee Porncharoenwase
I had this exact same question when I looked at the RacketScript issue lol. The answer is https://docs.racket-lang.org/reference/numbers.html: a complex number with an exact zero imaginary part is a real number. Since 0.0 is not exact, 0.0i is not a real number. On Fri, Nov 19, 2021 at 11:59

[racket-users] confusion about real vs not real zero

2021-11-19 Thread Stephen Chang
In the following, why is the first considered a real number but the second considered not real > (real? 0.0+0i) #t > (real? 0.0+0.0i) #f -- You received this message because you are subscribed to the Google Groups "Racket Users" group. To unsubscribe from this group and stop receiving emails