Return to BSD News archive
Newsgroups: comp.os.386bsd.bugs Path: sserve!newshost.anu.edu.au!munnari.oz.au!news.Hawaii.Edu!ames!elroy.jpl.nasa.gov!swrinde!cs.utexas.edu!uunet!math.fu-berlin.de!easix!knobel!andreas From: andreas@knobel.GUN.de (Andreas Klemm) Subject: Re: 0.0 == -1.0? Organization: Andreas Klemm, D-4040 Neuss 21 References: <12323@blue.cis.pitt.edu> Message-ID: <1993May30.074651.711@knobel.GUN.de> Date: Sun, 30 May 93 07:46:51 GMT Lines: 30 In <12323@blue.cis.pitt.edu> goalie3+@pitt.edu (Robert W Kramer) writes: |Hello out there! |Hopefully, this is not a problem that has already been hasshed & rehashed (I |don't read news too often). |Consider the following program: |#include <stdio.h> |void main(void) { | double val; | val = 0.0; | printf("%f\n",val); |} |WHY, oh why, does the program output -1.00000????? |%lf does not work. |HOWEVER, changing the 0.0 to 0 fixes the problem. |I'm using 386BSD, no patchkits, no '387. The result on my machine is : 0.000000 I'm running 386BSD 0.1 Patchkit Level 0.2.3. You should patch your system up to this level. Many bugfixes and additional functionality (more progs from NET 2 Tape)! -- ---- Andreas Klemm ------- /////// andreas@knobel.GUN.de \\\\\\\ private : +49 2137 12609 D-4040 Neuss 21 (Norf), Germany at work : +49 2173 3964 161 Wiechers & Partner Datentechnik GmbH Telefax : +49 2173 3964 222 Abteilung Unix Support, D-4019 Monheim