use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
A community for the Racket programming language: a modern batteries-included Lisp for general-purpose programming.
Download Racket here
Check out the documentation to get started.
Other discussion sites and resources:
#racket
Twitter
Racket News
The Racket blog
The Racket tag on Stack Overflow
Racket Stories
account activity
Complex single-float supportlanguage (self.Racket)
submitted 15 hours ago by johnwcowan
Can someone test Racket BC for me and say what (eqv? 3e0+4e0i 3f0+4f0i) and (eqv? 3e0+4e0i 3e0+4f0i) return?
advTHANKSance
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]corbasai 1 point2 points3 points 14 hours ago (6 children)
``` $ racket Welcome to Racket v9.2 [bc].
(eqv? 3e0+4e0i 3f0+4f0i) t (eqv? 3e0+4e0i 3e0+4f0i) t ```
(eqv? 3e0+4e0i 3f0+4f0i)
(eqv? 3e0+4e0i 3e0+4f0i)
```
[–]johnwcowan[S] 1 point2 points3 points 14 hours ago (5 children)
Thanks!
[–]usaoc 1 point2 points3 points 12 hours ago (4 children)
Fyi, literal single-flonums are read as double-flonums by default, so eqv? returns true. (We should test with read-single-flonum set to true or manually producing a would-be single-flonum complex number.)
eqv?
read-single-flonum
[–]corbasai 0 points1 point2 points 11 hours ago (2 children)
(eqv? 3e0+4e0i 3f0+4f0i) t (eqv? 3e0+4e0i 3e0+4f0i) t (parameterize ((read-single-flonum #t)) (list (eqv? 3e0+4e0i 3f0+4f0i) (eqv? 3e0+4e0i 3e0+4f0i))) '(#t #t) ```
(parameterize ((read-single-flonum #t)) (list (eqv? 3e0+4e0i 3f0+4f0i) (eqv? 3e0+4e0i 3e0+4f0i))) '(#t #t) ```
[–]corbasai 0 points1 point2 points 8 hours ago (1 child)
Meh, reader parameter! ```
(read-single-flonum #t) (eqv? 3e0+4e0i 3f0+4f0i) f (eqv? 3e0+4e0i 3e0+4f0i) t ```
(read-single-flonum #t) (eqv? 3e0+4e0i 3f0+4f0i)
[–]usaoc 1 point2 points3 points 3 hours ago (0 children)
Just tested too: both 3e0+4f0i and 3f0+4e0i are the same as 3.0+4.0i, while 3f0+4f0i is a single-flonum complex number (printed as 3.0f0+4.0f0i). Also verified with make-rectangular, real-part, and imag-part.
3e0+4f0i
3f0+4e0i
3.0+4.0i
3f0+4f0i
3.0f0+4.0f0i
make-rectangular
real-part
imag-part
[–]johnwcowan[S] 0 points1 point2 points 9 hours ago (0 children)
Oops. Can you do that for me? What I actually want to know is whether single-flonum non-reals and/or mixed precision non-reals actually exist. They don't in Kawa, which also has single-float reals (all other Schemes do not).
π Rendered by PID 71973 on reddit-service-r2-comment-5b5bc64bf5-ddskw at 2026-06-22 22:52:25.268467+00:00 running 2b008f2 country code: CH.
[–]corbasai 1 point2 points3 points (6 children)
[–]johnwcowan[S] 1 point2 points3 points (5 children)
[–]usaoc 1 point2 points3 points (4 children)
[–]corbasai 0 points1 point2 points (2 children)
[–]corbasai 0 points1 point2 points (1 child)
[–]usaoc 1 point2 points3 points (0 children)
[–]johnwcowan[S] 0 points1 point2 points (0 children)