I found the long form in the dissertation easier to understand.
<https://docs.racket-lang.org/guide/performance.html?q=fixnum|19.8 Fixnum and Flonum Optimizations> states “On a 64-bit machine, 60–62 bits plus a sign bit are available.” Why the range? On my Macbook Pro, it seems 60 bits is the max for a fixnum?
I think, it is 62 for bc and 60 for cs (or perhaps the other way around).
I’m running CS, so I guess 60 for CS.
#lang racket
(let loop ([n 1] [i 0])
(displayln (list n i (fixnum? n)))
(when (fixnum? n)
(loop (* 2 n) (+ i 1))))
need a sub1
yes, that’s better
If you happen to have Chez Scheme installed, you can try (most-positive-fixnum)
.
I’d feel better if you implemented a bisection search after the exponential phase :sweat_smile:
Or (vm-eval '(most-positive-fixnum))
in Racket
Would they share the same stdlib?
Is there a nice way to upgrade my Racket install so that I don’t have to reinstall and setup everything again? I use both Windows and Linux so solutions for either/both would be appreciated. On Windows I just install via the installer, but on Linux I use the script installer in a single directory rather than a machine wide install.