Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #25747
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.datemas.de!weretis.net!feeder1.news.weretis.net!news.solani.org!.POSTED!not-for-mail |
|---|---|
| From | "Christoph M. Becker" <cmbecker69@arcor.de> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: IE and IEE 754 |
| Date | Thu, 28 Aug 2014 00:47:16 +0200 |
| Organization | solani.org |
| Lines | 40 |
| Message-ID | <ltln5d$pkm$1@solani.org> (permalink) |
| References | <hN2dnbb1qJ8oT2DOnZ2dnUVZ_oGdnZ2d@westnet.com.au> <XnsA396E092544BEeejj99@194.109.133.133> <ltlfdh$tgs$1@solani.org> <XnsA397158B22A7eejj99@194.109.133.133> |
| Mime-Version | 1.0 |
| Content-Type | text/plain; charset=ISO-8859-15 |
| Content-Transfer-Encoding | 7bit |
| X-Trace | solani.org 1409179629 26262 eJwFwYkBwCAIA8CVxBCecVo0+4/gHREWkx4Mp6hG6XRb8hBuN4G4H7nOXmpOzb/dhNoGSfYAB34QgA== (27 Aug 2014 22:47:09 GMT) |
| X-Complaints-To | abuse@news.solani.org |
| NNTP-Posting-Date | Wed, 27 Aug 2014 22:47:09 +0000 (UTC) |
| User-Agent | Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.6.0 |
| X-User-ID | eJwFwYEBwCAIA7CXBNpOzwEm/59gwpCpP4gCh1OcbTfYU+mOjdMjlMca2vkzCNpNW64FVTwc0RCP |
| In-Reply-To | <XnsA397158B22A7eejj99@194.109.133.133> |
| Cancel-Lock | sha1:3kNf/LOfIm1j8Co50DcTL5BG0to= |
| X-NNTP-Posting-Host | eJwNycEBwCAIA8CVQAjQcUTJ/iPY+x4sNE56IBwEZwvIGdT6bt2zzSkT1pw1DFT6f8mS1drUBzmuEdQ= |
| Xref | csiph.com comp.lang.javascript:25747 |
Show key headers only | View raw
Evertjan. wrote: > "Christoph M. Becker" <cmbecker69@arcor.de> wrote on 27 aug 2014 in > comp.lang.javascript: > > I wes not talking about the integer type, > I was not talking about Javascript [ECMA if you like], > but about integers. Well, then you're off topic. > Compare this to: > > document.write(23.45-23.4); // 0.05000000000000071 > > You are quite in your right > not to call the first method "better", > but in monetary calculus, I would disagree. Well, then try to calculate the German VAT with "integers": 2345 * 1.19 -> 2790.5499999999997 Ah, we have to round the result: (2345 * 1.19).toFixed(0) -> 2791 Or: (23.45 * 1.19).toFixed(2) -> 27.91 Hm, same result (but see <http://www.jibbering.com/faq/#formatNumber> for very old browsers). Anyway, you can't do arbitrary monetary calculations reliably with IEEE 754 doubles. However, that is the only number type that is guaranteed to be supported by conforming ECMAScript implementations. -- Christoph M. Becker
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
IE and IEE 754 RobG <rgqld@iinet.net.au> - 2014-08-27 22:44 +1000
Re: IE and IEEE 754 John Harris <niam@jghnorth.org.uk.invalid> - 2014-08-27 15:23 +0100
IE and IEEE 754 (was: IE and IEE 754) Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-08-27 20:59 +0200
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-27 22:04 +0200
Re: IE and IEE 754 "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-08-27 22:35 +0200
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-28 00:07 +0200
Re: IE and IEE 754 "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-08-28 00:47 +0200
Re: IE and IEE 754 Gene Wirchenko <genew@telus.net> - 2014-08-28 10:13 -0700
Re: IE and IEE 754 "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-08-28 22:15 +0200
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-28 23:24 +0200
Re: IE and IEE 754 "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-08-29 01:16 +0200
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-29 09:32 +0200
Re: IE and IEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-27 23:59 +0100
Re: IE and IEE 754 "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-08-28 02:55 +0200
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-28 09:50 +0200
Re: IE and IEE 754 Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-08-28 12:21 +0200
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-28 13:42 +0200
Re: IE and IEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-28 11:27 +0100
Re: IE and IEE 754 Gene Wirchenko <genew@telus.net> - 2014-08-28 10:16 -0700
Re: IE and IEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-29 00:04 +0100
Re: IE and IEE 754 Gene Wirchenko <genew@telus.net> - 2014-08-29 11:15 -0700
IEEE 754 (was: IE and IEE 754) "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-08-29 21:30 +0200
Re: IEEE 754 (was: IE and IEE 754) Gene Wirchenko <genew@telus.net> - 2014-09-02 11:22 -0700
Re: IE and IEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-29 20:42 +0100
IEEE 754 (was: IE and IEE 754) "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-08-29 23:29 +0200
Re: IEEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-29 23:27 +0100
Re: IE and IEE 754 Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-08-30 20:32 +0100
Re: IE and IEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-31 01:04 +0100
IE and IEEE 754 Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-09-01 23:05 +0100
Re: IE and IEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-28 00:05 +0100
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-28 08:56 +0200
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-28 09:51 +0200
Re: IE and IEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-28 11:16 +0100
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-28 13:34 +0200
Re: IE and IEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-28 23:41 +0100
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-29 09:09 +0200
Re: IE and IEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-29 12:39 +0100
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-29 16:55 +0200
Re: IE and IEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-29 18:28 +0100
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-30 00:37 +0200
Re: IE and IEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-29 23:53 +0100
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-30 01:08 +0200
Re: IE and IEE 754 Ben Bacarisse <ben.usenet@bsb.me.uk> - 2014-08-30 00:40 +0100
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-30 09:32 +0200
Re: IE and IEE 754 Gene Wirchenko <genew@telus.net> - 2014-08-29 11:22 -0700
Re: IE and IEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-30 00:14 +0200
IE and IEEE 754 (was: IE and IEE 754) "Christoph M. Becker" <cmbecker69@arcor.de> - 2014-08-27 22:08 +0200
Re: IE and IEEE 754 RobG <rgqld@iinet.net.au> - 2014-08-28 22:50 +1000
Re: IE and IEEE 754 RobG <rgqld@iinet.net.au> - 2014-08-28 22:55 +1000
Re: IE and IEEE 754 (was: IE and IEE 754) Dr J R Stockton <reply1400@merlyn.demon.co.uk.invalid> - 2014-08-28 21:50 +0100
Re: IE and IEEE 754 (was: IE and IEE 754) "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-29 09:43 +0200
Re: IE and IEEE 754 (was: IE and IEE 754) Denis McMahon <denismfmcmahon@gmail.com> - 2014-08-29 08:42 +0000
Re: IE and IEEE 754 Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-08-30 16:24 +0200
Re: IE and IEEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-30 17:08 +0200
Re: IE and IEEE 754 Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2014-08-30 18:12 +0200
Re: IE and IEEE 754 "Evertjan." <exxjxw.hannivoort@inter.nl.net> - 2014-08-30 18:32 +0200
csiph-web