From: Uncle George <gatgul@voicenet.com>
To: axp-list@redhat.com
Subject: Re: glibc & ceil()
Date: Fri, 27 Oct 2000 07:07:17 -0500 [thread overview]
Message-ID: <39F96FF5.7F22DA9C@voicenet.com> (raw)
In-Reply-To: 39F8090C.4268451C@voicenet.com
[-- Attachment #1: Type: text/plain, Size: 81 bytes --]
Uncle George wrote:
> is the correct result of ceil( -0.5) -0.0 or 0.0 ?
>
[-- Attachment #2: ceil.c --]
[-- Type: application/octet-stream, Size: 206 bytes --]
main()
{
double d, r;
long fpcr;
fpcr = (2L << 58 ); /* Normal Rounding */
asm volatile ( "mt_fpcr %0 ; excb" : : "f"(fpcr));
d = -0.5;
r = ceil( d );
printf("d = %g, r = %g\n", d, r);
}
next parent reply other threads:[~2000-10-27 12:06 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <39F8090C.4268451C@voicenet.com>
2000-10-27 12:07 ` Uncle George [this message]
2000-10-27 12:45 ` glibc & ceil() Andrei A. Dergatchev
2000-10-27 13:13 ` Uncle George
2000-10-27 13:25 ` Andrei A. Dergatchev
2000-10-27 17:40 ` Richard Henderson
read-only archive
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox