Re: what is happening in C when increment this way?

From: CBFalconer (cbfalconer_at_yahoo.com)
Date: 01/30/05


Date: Sun, 30 Jan 2005 15:09:40 GMT

puzzlecracker wrote:
> John Valko wrote:
>> puzzlecracker wrote:
>
>>> If you run this program, it will give very unexpected results.
>>> Can anyone explain the nature of this anamaly? (also what is the

... snip ...
>
> I mean %f actually ---- it does print but it gets weirder
> try it withj %f

Seems perfectly normal to me. I get:

0.000000
0.100000
.... snip ....
99.799049
99.899048
99.999046

What do you think the exact value of your 0.1 constant really is?

-- 
"If you want to post a followup via groups.google.com, don't use
 the broken "Reply" link at the bottom of the article.  Click on 
 "show options" at the top of the article, then click on the 
 "Reply" at the bottom of the article headers." - Keith Thompson


Relevant Pages

  • Re: Anglo-Saxon Naming Traditions
    ... better approach may be look at relative proportions of names held by ... Certainly gathering only the very top and bottom seems ... A family might be thought to consist not only of those members ...
    (soc.history.medieval)
  • Re: Anglo-Saxon Naming Traditions
    ... better approach may be look at relative proportions of names held by ... Certainly gathering only the very top and bottom seems ... A family might be thought to consist not only of those members ...
    (soc.history.medieval)
  • Re: Helicopters, firearms and bagpipes
    ... yer face--ain't even remotely scenic. ... Bottom line is that it was a great partay. ...
    (rec.motorcycles.harley)
  • Re: RM/Cobol Error code 98s
    ... doing in the RM/COBOL program, or anything we are doing either. ... It is certainly the COBOL software that is *reporting* the problem, ... will help you get to the bottom of the problem. ...
    (comp.lang.cobol)
  • Re: labels thrown "out of whack" when cell or table margins changed? How to fix ... ?
    ... Am I missing a break of some sort at the bottom ... underneath the end of the table on the page of my original Word template. ... this seemed to do the trick. ...
    (microsoft.public.word.mailmerge.fields)