On Fri, Jan 26, 2024 at 11:02 AM Antero Mejr <[email protected]> wrote:

> There is a ratio generator used internally for supported
> implementations, but it is not exposed to the user because ratios are
> implementation details and not part of the numeric tower. Same goes for
> bignums and flonums IMO.
>

If by "ratio" is meant "exact real non-integer" then it is not an
implementation detail.



On Fri, Jan 26, 2024 at 12:42 PM Marc Feeley <[email protected]>
wrote:


While there is no foolproof way to determine the size of fixnums, there are
> heuristic ways to get this value.  For example see the attached program.



It's more efficient to examine only integers of the form 2^n-1.  In
addition, an easier empirical approach with no external dependencies is to
rely on the de facto property that (eq? k k) => #t iff k is a fixnum.  This
is how my survey at <https://docs.scheme.org/surveys/fixnum-info> works on
Schemes that don't have a `fixnum?` procedure.

Reply via email to