Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!uunet!virtech!cpcahil From: cpcahil@virtech.uucp (Conor P. Cahill) Newsgroups: comp.unix.sysv386 Subject: Re: Xenix 2.3.3 386 floating point problem Keywords: Xenix floating point Message-ID: <1990Oct03.042002.3473@virtech.uucp> Date: 3 Oct 90 04:20:02 GMT References: <1191@integow.uucp> Reply-To: cpcahil@virtech.UUCP (Conor P. Cahill) Organization: Virtual Technologies Inc., Sterling VA Lines: 20 In article <1191@integow.uucp> hot@integow.uucp (Roland van Hout) writes: >We are using an 25 Mhz Compaq 300 Mb no FPU 8 Mb ram, >and Xenix V.2.3.3. >I'm expiriencing troubles with the calculation of floats: >I have a float which contains :90099090001018.000000 The problem isn't in xenix. It isn't the compiler itself. It is that binary based hardware (like the computer you are running this stuff on) does not acurately handle floating point digits. This is a fact of life. If you need exact precision, you must use integers, find a BCD (binary coded decimal) implementation or provide your own library to act on big floating numbers (can you remember how to do long division by hand ? :-). -- Conor P. Cahill (703)430-9247 Virtual Technologies, Inc., uunet!virtech!cpcahil 46030 Manekin Plaza, Suite 160 Sterling, VA 22170