exact-integer-complex-generator Shiro Kawai (22 Mar 2024 05:40 UTC)
Re: exact-integer-complex-generator Antero Mejr (22 Mar 2024 17:16 UTC)

Re: exact-integer-complex-generator Antero Mejr 22 Mar 2024 17:16 UTC

Shiro Kawai <xxxxxx@gmail.com> writes:

> The created generator is said to return objects that fulfill all of exact?,
> integer? and complex?.  But objects that satisfy integer? always satisfy
> complex? as well, so it's not clear how it differs from exact-integer-generator.
>
> Is the intention is that the generator generates objects z such that (and
> (integer? (real-part z)) (integer? (imag-part z)))?

Yes the first sentence of the exact-integer-complex-generator
specification is confusing. The purpose of the generator is that it does
not create numbers with exact ratio real/complex parts on
implementations that support ratios. The second sentence clarifies that:

The real and imaginary parts of the complex numbers must be exact
integers.

I can update the first sentence to say:

Create an infinite generator that returns objects that fulfill the
exact? and complex? predicates.

and make a PR after this round of comments, thank you.