Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Ben Bacarisse Newsgroups: comp.lang.javascript Subject: Re: IE and IEE 754 Date: Fri, 29 Aug 2014 12:39:28 +0100 Organization: A noiseless patient Spider Lines: 58 Message-ID: <87iolbjzin.fsf@bsb.me.uk> References: <87a96p1qkd.fsf@bsb.me.uk> <87y4u8zzpo.fsf@bsb.me.uk> <877g1sme3j.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx05.eternal-september.org; posting-host="017616aa25f81ec581c44d76d61ba2f3"; logging-data="26375"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/p1b8s53hOqFSk1GHWG/2CKnhOnX8PSNo=" Cancel-Lock: sha1:cyt7lUDe4KSzu1kUaXlz1wqikQQ= sha1:AQM4xNhtv8muriNgsjAibUZ8AmQ= X-BSB-Auth: 1.823f7a635722fa6c1285.20140829123928BST.87iolbjzin.fsf@bsb.me.uk Xref: csiph.com comp.lang.javascript:25774 "Evertjan." writes: > Ben Bacarisse wrote on 29 aug 2014 in > comp.lang.javascript: > >> "Evertjan." writes: >> >>> Ben Bacarisse wrote on 28 aug 2014 in >>> comp.lang.javascript: >>>> You mean "yes, but..." surely? You did not say that that they cannot be >>>> *trusted* to be exact, you said that they can't ever be exact. >>> >>> Wow, are you still in kindergarten? >> >> I'd like to try to unravel this. I don't think I am wrong to say that >> 0.5 can be converted to a binary floating point value exactly, and I >> don't think you disagree on that point, but can you see that what you >> wrote: >> >> "... the binary converions of floting point fractional decimal values >> NEVER can be right" >> >> does seem to suggest otherwise? I even suggested that there was a >> communication problem: >> >> "What about 0.5 or 0.25? Why can't these ever be right? Did you mean >> that *all* decimal fractions can't be correctly converted? That's >> certainly the case. The way you worded it sounds like none of them >> can be." >> >> But that was not, it seems, what you wanted to say. >> >> When you rejected my examples of 0.5 and 0.25 you said the conversion >> could not be trusted to be exact (correct me, if I've misunderstood that >> as well). That sounded exactly like a "yes they can be exact, but they >> can't be trusted to be exact". > > "Fixed point decimal strings" can incidentally be exact, like > '27.00', but the whole idea is the you as a programmer, when allowing for > fractional input strings[!], don't know beforehand what number will be > inputted, and an incidental input of '0.50' cannot be taken as exact, > because you would have to make an array of exact decimal values, and still > have the rest of the possibilities delt with as non-exact. > > Therefore your example of 0.5 is childish, as it does not seriously address > the problem of binary conversion in programmes. But it's unfair of you to make that accusation when I never intended it to be anything other than a counter example to what looked like a simple statement of fact. I'm sorry you thought I was offering an example that addressed the general problem of decimal to binary floating point conversion, but I can't see how you could think I was, especially as I explicitly suggested that maybe your remark had come over as being more general than you had intended. -- Ben.