delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/2004/02/24/10:40:21

X-Authentication-Warning: delorie.com: mail set sender to djgpp-bounces using -f
Date: Tue, 24 Feb 2004 10:39:28 -0500
Message-Id: <200402241539.i1OFdSon024698@envy.delorie.com>
From: DJ Delorie <dj AT delorie DOT com>
To: djgpp AT delorie DOT com
In-reply-to: <c1fijm$314$2@nets3.rz.RWTH-Aachen.DE> (message from
Hans-Bernhard Broeker on 24 Feb 2004 13:12:22 GMT)
Subject: Re: Fibonacci number
References: <d7c3a0b2 DOT 0402220759 DOT 34d6435d AT posting DOT google DOT com> <4038E8CA DOT 6491815E AT virginia DOT edu> <4039DD96 DOT 3F36F3B7 AT yahoo DOT com> <200402231458 DOT i1NEwKwm020904 AT envy DOT delorie DOT com> <403A301C DOT E8F5FE65 AT yahoo DOT com> <200402231751 DOT i1NHp5lv022894 AT envy DOT delorie DOT com> <c1fijm$314$2 AT nets3 DOT rz DOT RWTH-Aachen DOT DE>
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

> Since negation is a well-defined operation on unsigned longs, there's
> no error involved.

This makes no sense.  *All* arithmetic operations are well defined for
all integer types, but still, POSIX requires a range error.  IMHO this
means we're meant to check the range of the number *before* folding it
to the target type.

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019