comp.lang.ada
 help / color / mirror / Atom feed
From: desj@brahms (David desJardins)
Subject: Re: Getting the integer part of a real
Date: Mon, 10-Nov-86 17:12:31 EST	[thread overview]
Date: Mon Nov 10 17:12:31 1986
Message-ID: <240@cartan.Berkeley.EDU> (raw)
In-Reply-To: 996@wayback.UUCP

In article <996@wayback.UUCP> arny@wayback.UUCP (Arny B. Engelson) writes:
>The above algorithm only works for POSITIVE values of X!  For example, if
>X = -0.7 this will return -1 instead of 0.  The "integer part of a real
>number" is a truncate function:

   Not to restart the flame wars (I hope!), but when this topic has been
discussed in the past, the consensus (at least among mathematicians) has
been that "round-down" is preferable to "round-toward-zero."  At the very
least it is not clear that the latter is preferable.

   -- David desJardins

  reply	other threads:[~1986-11-10 22:12 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1986-11-05 14:25 Getting the integer part of a real emery
1986-11-07 13:47 ` Robert Firth
1986-11-07 14:27 ` Arny B. Engelson
1986-11-10 22:12   ` David desJardins [this message]
1986-11-07 15:31 ` emery
  -- strict thread matches above, loose matches on Subject: below --
1986-11-12 13:34 Hazel
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox