chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] From inexact to exact using the "-" procedure?


From: Christian Kellermann
Subject: Re: [Chicken-users] From inexact to exact using the "-" procedure?
Date: Fri, 23 Mar 2012 21:28:46 +0100
User-agent: Mutt/1.5.21 (2010-09-15)

Hi Jeronimo,

* Jeronimo Pellegrini <address@hidden> [120323 21:16]:
> I'm not sure if this is a bug or a feature:
> 
> #;1> (use numbers)
> #;2> (define y (* 0.1 1+1i))

I am not a numbers expert but I think you have tainted your exactness
by using an inexact flonum.

Try:

#;10> (define y (* 1+1i #e0.1))
#;11> (define a (+ 1 y)) 
#;12> (define b (+ 2 y))
#;13> (exact? (- a b))
#t

Alternatively divide by 10...

Does this make sense to you?

HTH,

Christian

-- 
9 out of 10 voices in my head say, that I am crazy,
one is humming.



reply via email to

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