From mboxrd@z Thu Jan 1 00:00:00 1970 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 111c93,47f79c0da38c8a0 X-Google-Attributes: gid111c93,public X-Google-ArrivalTime: 2003-06-20 00:55:12 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news.uchicago.edu!yellow.newsread.com!netaxs.com!newsread.com!newsfeed00.sul.t-online.de!newsmm00.sul.t-online.com!t-online.de!news.t-online.com!not-for-mail From: Falk Hueffner Newsgroups: comp.os.linux.alpha Subject: Re: floating point problem Date: 20 Jun 2003 09:53:39 +0200 Organization: T-Online Sender: falk@juist Message-ID: <87r85prxq4.fsf@student.uni-tuebingen.de> References: <874r2mkon5.fsf@student.uni-tuebingen.de> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: news.t-online.com 1056095621 07 6028 8JHvV6eSS6AOFl 030620 07:53:41 X-Complaints-To: usenet-abuse@t-online.de X-ID: JTl5McZFgeDVTnCfg3BiGK3LvVTdlS7+66jSz588ZLRR3h9lb7d3Qr X-Face: "iUeUu$b*W_"w?tV83Y3*r:`rh&dRv}$YnZ3,LVeCZSYVuf[Gpo*5%_=/\_!gc_,SS}[~xZ wY77I-M)xHIx:2f56g%/`SOw"Dx%4Xq0&f\Tj~>|QR|vGlU}TBYhiG(K:2 writes: > -mieee works quite good. but i get wrong results. > > check = 5.877472e-39 / 2.0; > > on x86:>Check: 2.938736e-39 > on alpha:>Check: 5.562685e-309 That's an underflow. On Alpha, FLT_MIN is 1.175494e-38, and DBL_MIN 2.225074e-308. So you should probably use double. Note also that -mieee will incur a noticeable slowdown on models prior to EV6 (and a horrendous slowdown if denormals actually occur, since the kernel will emulate them). -- Falk