Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: "Christoph M. Becker" Newsgroups: comp.lang.javascript Subject: IEEE 754 (was: IE and IEE 754) Date: Fri, 29 Aug 2014 21:30:05 +0200 Organization: solani.org Lines: 29 Message-ID: References: <87fvgh1qu9.fsf@bsb.me.uk> <87sikgzz71.fsf@bsb.me.uk> <3souv99slp2vt6nktr48gadd2e4r8th8o4@4ax.com> <871ts0md0v.fsf@bsb.me.uk> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: solani.org 1409340595 25771 eJwFwYEBwCAIA7CXlNF2nsNY+f8EEzzcbCXBxGBiF4n6V8dur1GA/qbjvK5yQtaEmLR12BcjAhFu (29 Aug 2014 19:29:55 GMT) X-Complaints-To: abuse@news.solani.org NNTP-Posting-Date: Fri, 29 Aug 2014 19:29:55 +0000 (UTC) User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 X-User-ID: eJwFwYEBwDAEBMCVBP9inKD2H6F3MB52OEHHYjtFiGKbphbC/OmHxo46ZHrq5Q3VSLkpp34NzRBu In-Reply-To: Cancel-Lock: sha1:5x1mRf4Zq7rPZz+ICd+G+DtkrNg= X-NNTP-Posting-Host: eJwNysEBwCAIA8CVJEIs41QC+4/Q3vti01jHGfSYGDuFd+44a7twoVxNyeTRqq4nwxL/GywKHzBZEY8= Xref: csiph.com comp.lang.javascript:25781 Gene Wirchenko wrote: > On Fri, 29 Aug 2014 00:04:48 +0100, Ben Bacarisse > wrote: > >> Gene Wirchenko writes: >> >>> On Thu, 28 Aug 2014 11:27:30 +0100, Ben Bacarisse >>> wrote: >>> >>>> I think it must. The ECMAScript specification imports IEEE 754's strict >>>> rounding and representation rules. The IEEE FP value closest to 123.45, >>>> when multiplies by 100 must yield 12345 according to those rules. >>> >>> Why? What if the value that you have (and want) happens to be >>> the value closest to 123.45? When you multiply that value by 100, >>> wouldn't you want 100 times the value instead of 12345? >> >> Yes, but you won't get it. You'll get the nearest floating point >> number, which is 12345. Am I missing your point? > > Yes. The value closest to 123.45 can be represented exactly. So > can 100 times that value. If I am not mistaken, this conclusion is not correct. -- Christoph M. Becker