Article View: alt.os.linux.mandrake
Article #513Re: Problems with float variables in C
From: Francis Glassborow
Date: Thu, 06 Sep 2001 03:23
Date: Thu, 06 Sep 2001 03:23
19 lines
2314 bytes
2314 bytes
In article <clcm-20010905-0003@plethora.net>, Rishabh Gupta <rg117@ohm.york.ac.uk> writes >Hi all, > I've been getting really strange results in my program when I use very >small float values. For example, I check for 0.0 in case of division by zero >errors but I still get the error. I also get other strange results >like -0.0000...... (although I'm guessing that its just not displaying all >the digits) But if you divide a sufficiently large number by a sufficiently small one (note that those two conditions are coupled) you will get overflow. Francis Glassborow ACCU 64 Southfield Rd Oxford OX4 1PA +44(0)1865 246490 All opinions are mine and do not represent those of any organisation -- comp.lang.c.moderated - moderation address: clcm@plethora.net
Technical Details
Message-ID:
<clcm-20010905-0007@plethora.net>Path:
arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!news-out.visi.com!hermes.visi.com!gemini.plethora.net.POSTED!not-for-mailReferences:
<clcm-20010905-0003@plethora.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11318c,898a7d80327816b3 X-Google-Attributes: gid11318c,public X-Google-Thread: 108717,898a7d80327816b3 X-Google-Attributes: gid108717,public X-Google-Thread: f8a83,898a7d80327816b3 X-Google-Attributes: gidf8a83,public X-Google-Thread: 100850,77ebfbc06b0f9856 X-Google-Attributes: gid100850,public X-Google-Thread: f65d0,898a7d80327816b3 X-Google-Attributes: gidf65d0,public X-Google-ArrivalTime: 2001-09-05 20:23:44 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!newsfeed.google.com!newsfeed.stanford.edu!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!nntp.abs.net!news-out.visi.com!hermes.visi.com!gemini.plethora.net.POSTED!not-for-mail Subject: Re: Problems with float variables in C Approved: clc@plethora.net References: <clcm-20010905-0003@plethora.net> From: Francis Glassborow <francis.glassborow@ntlworld.com> X-Newsreader: Turnpike Integrated Version 5.00 U <TilyaeicE$WmMOP9F8P4$y3lmP> Organization: Southfield Microcomputer SS Return-Path: <francis.glassborow@ntlworld.com> Mime-Version: 1.0 Reply-To: Francis Glassborow <francisG@robinton.demon.co.uk> Newsgroups: alt.os.linux.mandrake,comp.lang.c.moderated,comp.programming,gnu.gcc,gnu.gcc.help Message-ID: <clcm-20010905-0007@plethora.net> Originator: clcm@plethora.net (Comp Lang C'Moderated) Date: 06 Sep 2001 03:23:40 GMT Lines: 19 NNTP-Posting-Host: 1da7853f.news.plethora.net X-Trace: 999746620 gemini.plethora.net 329 clcm@205.166.146.1 X-Complaints-To: abuse@plethora.net