Xref: utzoo comp.lang.c:10649 misc.wanted:2412 comp.sys.m68k:903 comp.unix.questions:7530
Path: utzoo!attcan!uunet!lll-winken!csustan!robert
From: robert@csustan.UUCP (Robert Zeff)
Newsgroups: comp.lang.c,misc.wanted,comp.sys.m68k,comp.unix.questions
Subject: Trouble with floor ()
Keywords: ceil, floor, Greenhill, Tektronix4301
Message-ID: <1146@csustan.UUCP>
Date: 11 Jun 88 19:34:54 GMT
Distribution: na
Organization: CSU, Stanislaus; Turlock, California
Lines: 26


I'm having trouble with ceil () & floor ().
This program returns the correct values on the first loop only.
On successive passes, floor() returns the same result as ceil().
I'm using a Tektronix 4301 (68020, UTEK & BSD4.3, 
GreenHills C compiler.)

#include 
main () {
  double value, ceil (), floor ();
  
  for (;;) {
    printf ("\nInput value: ");
    scanf ("%lf", &value);
    printf ("\nCeiling: %lf, Floor: %lf\n", ceil (value), floor (value));
  }
}

Anyone else having this problem on other hardware?
thanks,



-- 
Robert Zeff                         (209) 577-4268 voice, FAX: (209) 577-8548
2549 Yosemite Blvd Ste. E           {lll-lcc,lll-crg}!csustan!zhome!robert
Modesto, Ca. 95354                  {lll-lcc,lll-crg}!csustan!robert