chicken-hackers
[Top][All Lists]
Advanced

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

Re: [Chicken-hackers] [PATCH] Re: make check failing


From: Peter Bex
Subject: Re: [Chicken-hackers] [PATCH] Re: make check failing
Date: Sat, 5 Jan 2013 00:03:57 +0100
User-agent: Mutt/1.4.2.3i

On Fri, Jan 04, 2013 at 11:58:33PM +0100, Peter Bex wrote:
> On Fri, Jan 04, 2013 at 11:39:51PM +0100, Felix wrote:
> > > 
> > > I'm thinking bugs like indexing a pixel or a database record at position
> > > 1.5 due to a mistaken offset calculation.  I've made mistakes like that
> > > in the past and would like those to be caught early.  I know we can
> > > always add additional checks in wrapper code around the call, but I think
> > > that if I'm asking for an integer it makes sense if it complains when
> > > passed some fractional value.
> > 
> > What happens when some integer computation involving fixnums ends up with
> > something like 123.0000000001 ? Must I always wrap my arguments in "round" ?
> 
> Actually, if you want to write portable code you must, and you must also
> wrap it in inexact->exact.

Sorry, didn't read your message properly.  If a calculation involving
only fixnums ends up as 123.0000000001, I think you have worse problems
than type mismatches.  In that case you really should be using the
numbers egg, or reorder the calculation to produce smaller results.

Cheers,
Peter
-- 
http://sjamaan.ath.cx



reply via email to

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