guile-devel
[Top][All Lists]
Advanced

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

Re: ratio implementation


From: Marius Vollmer
Subject: Re: ratio implementation
Date: Fri, 17 Oct 2003 17:42:44 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3 (gnu/linux)

Rob Browning <address@hidden> writes:

> Marius Vollmer <address@hidden> writes:
>
>> [...] People who have assumed that
>> inexact->exact always returns an integer need to think again (I'm
>> afraid I'm one of them...).
>
> Yep, I'm sure there are plenty of people in that situation.  I suspect
> it's been used heavily in places where a (C) function require an
> integer argument, i.e. (foo (inexact->exact (round x))).  Though as
> long as (inexact->exact (round x)) is guaranteed to return an integer,
> perhaps that's sufficient.

(inexact->exact (round x)) is OK, but just (inexact->exact x) and
assuming that inexact->exact implicitely rounds to an integer will
break.




reply via email to

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