*BSD News Article 14110


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!agate!howland.reston.ans.net!zaphod.mps.ohio-state.edu!uwm.edu!caen!batcomputer!cornell!uw-beaver!cs.ubc.ca!mprgate!rosenaue
From: rosenaue@mpr.ca (Dennis Rosenauer)
Subject: Is there a fix for floor(), ceil()?
Message-ID: <1993Apr6.193628.3040@mprgate.mpr.ca>
Sender: news@mprgate.mpr.ca
Nntp-Posting-Host: kant
Organization: MPR Teltech Ltd., Burnaby, B. C.
Date: Tue, 6 Apr 1993 19:36:28 GMT
Lines: 31


I was attempting to compile some code which I have been running on a Sun
on 386BSD.  I ran into a problem with floor() and ceil() not returning
the correct value.  For example:

/* test the floor function */

#include <math.h>

main()

	{
	printf("should be 10 but is %f\n",floor(10.9));
	}

does not return the expected value of 10 on 386BSD but works fine on
with the Sun C compiler.

Can anyone point me to a bug fix for this or is it my turn to fix this?
I have all the patches installed (patches on agate as of about 2 weeks ago
anyway) and all libraries and utilities recompiled.  I suspect that
either the library function in libm is broken or gcc's "cast" function
is broken.  Anyone have any ideas?

Thanks

-- 
Dennis Rosenauer VE7BPE                  rosenaue@mprgate.mpr.ca
MPR Teltech Ltd.
Radio & Satellite Network Development    "For every vision there is an
Burnaby, B. C.                            equal and opposite revision"