(complex-generator) Bradley Lucier (14 Jan 2024 18:03 UTC)
Re: (complex-generator) Antero Mejr (14 Jan 2024 19:05 UTC)
Re: (complex-generator) Bradley Lucier (15 Jan 2024 16:18 UTC)
Re: (complex-generator) Antero Mejr (21 Jan 2024 00:32 UTC)

Re: (complex-generator) Bradley Lucier 15 Jan 2024 16:17 UTC

On 1/14/24 2:04 PM, Antero Mejr (via srfi-252 list) wrote:
> The intention was to match the generator names to the type predicates,
> so exact? became exact-generator and inexact? became inexact-generator.

OK, that's interesting.

Perhaps the generators should correspond to

exact-integer              (and (exact? x) (integer? x))
exact-positive-integer     (and (exact? x) (integer? x) (positive? x))
exact-rational             (and (exact? x) (rational? x))
exact-real                 usually the same as exact-rational
exact-integer-complex      (and (exact? x) (integer? (real-part x))
(integer? (imag-part x))
exact-complex              (and (exact? x) (complex? x))
exact-number               usually the same as exact-complex

exact-positive-integer can help generate exact-rational.
exact-integer-complex is useful for some number theory tasks.

inexact-integer            (and (inexact? x) (integer? x))
inexact-rational           (and (inexact? x) (rational? x)) ;; finite
inexact-real               inexact-rational + infinities + nan
inexact-complex            (and (inexact? x) (complex? x))
inexact-number             usually the same as inexact-complex

then the union of inexact and exact:

integer
rational
real
complex
number

Perhaps.

Brad