chicken-hackers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Chicken-hackers] Patch for ticket #1587


From: Peter Bex
Subject: Re: [Chicken-hackers] Patch for ticket #1587
Date: Fri, 1 Mar 2019 14:07:00 +0100
User-agent: NeoMutt/20170113 (1.7.2)

On Fri, Mar 01, 2019 at 01:58:46PM +0100, address@hidden wrote:
> > I agree also given the existence of complex demotion in Chicken, whereby
> > (make-rectangular 1.0 0.0) => (the flonum 1.0).
> 
> I'm afraid I can't follow anymore, I'm not a math person. I just
> want to avoid surprises when exactness of numbers may change
> unexpectedly.

Same here.  I've closed the ticket, as I believe the current behaviour is fine.

> >  On the other hand, I think
> > complex demotion is actually a Bad Thing because it means that inexactness
> > in the computation of the imaginary part can make an inexact complex number
> > into a real number, even though the imaginary part isn't truly zero.

I don't think this should matter in most cases; any number can be treated
as a complex number by reading the real and imaginary components, which
will return 0 or 0.0 for the imaginary component if it's not a cplxnum.
Whether it is stored as a cplxnum or as a flonum should in most cases not
matter if the API is used properly.

Cheers,
Peter

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]