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 20:00:45 PST Path: archiver1.google.com!news1.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!sn-xit-03!sn-xit-04!sn-xit-06!sn-post-02!sn-post-01!supernews.com!corp.supernews.com!not-for-mail From: "Rigo Schultz" Newsgroups: comp.os.linux.alpha Subject: floating point problem Date: Fri, 19 Jun 2003 18:32:00 GMT Organization: Posted via Supernews, http://www.supernews.com Message-ID: X-Newsreader: EleBBS/W32 v0.10.rc1 X-Complaints-To: abuse@supernews.com Xref: archiver1.google.com comp.os.linux.alpha:7780 (CHARSET: PC-8) (PATH: 263/950 236/150 261/38 140/1 106/2000 123/500 3613/1275 134/10) From: Rigo Schultz I try to run some simulations at different hardware architectures, ALPHA EV6 and x86. Both runnig Linux. But I get Floating Point Exceptions at the Alpha system. It seems that the "float" and "double" range on EV6 are different to the x86 systems. Sorry, I'm not familar with that stuff. Here is a short c-source, that shows the difference. But I do'nt understand why the Alpha breaks too early. Thanks Rigo #include int main(void) { enum {N = 150}; int i; float under = 1.0; /* for underflow */ float over = 1.0; /* for overflow */ printf ("sizeof(int) = %d\n", sizeof(int)); printf ("sizeof(float) = %d\n", sizeof(float)); printf ("sizeof(double) = %d\n", sizeof(double)); printf ("sizeof(long double) = %d\n", sizeof(long double)); printf ("\n\n"); printf("\t i under over \n"); printf("\t--------------------------------\n"); for (i = 1; i <= N; ++i) { under /= 2.0; over *= 2.0; printf("\t %d %e %e\n", i, under, over); } return (0); } --- BBBS/NT v4.01 Flag-5 * Origin: TCOB1: A slice of life on your plate (2:263/950) -- This message posted from Shurato's Heavenly Sphere Telnet BBS telnet://shurato.darktech.org for abuse issues, please contact me at shurato@shurato.darktech.org Shurato: Admin of SHS.