On 7/20/26 17:13, Bradley Lucier wrote:
> I think we're piling complexity on complexity to accommodate what I
> consider to be some implementations' limitations (no mixed-exactness
> complex numbers).
I agree. However, my wish for real? etc. to have the R6RS definitions
was voted down in the Working Group. Exporting the more correct
definitions under a different name allows programmers to use those
definitions, and hopefully we can modify the definitions in a future
Report. (Then people can use the import renaming facility to port their
code.)
> If you have this rule and allow mixed exactness complex numbers, then
the problems of (* +i (* +i (* +i (* +i z)))) not being z goes away.
Is there a major benefit to having general mixed exactness complex
numbers, versus having imaginary numbers (a special case of mixed
exactness complex numbers)? That might be easier for people to implement.
> 1. I believe the condition on (angle z) in the definition of log
should be -\pi < angle z \leq \pi, i.e, the first inequality should be
strict.
Aha, this was incorrectly transcribed in the R6RS, which was carried
over in the R7RS. The R5RS has it correct. I will fix that in the next
draft.
> 2. I believe that you should specify the branch cut for sqrt, too,
then the branch cuts of the inverse trigonometric and inverse hyperbolic
functions are well defined.
>
> 3. I would recommend allowing (using 0 and 1 to mean exact 0 and
exact 1):
Will do. I have also incorporated the list from your forwarded proposal.
> 4. I think the signs of the real part of the result are mistaken here:
I will fix this along with the sample implementation.
-- Peter McGoron