Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #13880
| From | Dr J R Stockton <reply1219@merlyn.demon.co.uk.not.invalid> |
|---|---|
| Newsgroups | comp.lang.javascript |
| Subject | Re: FAQ Topic - Why does simple decimal arithmetic give strange results? (2012-05-10) |
| Date | 2012-05-11 22:27 +0100 |
| Organization | Home |
| Message-ID | <S6cL3lCmQYrPFwf1@invalid.uk.co.demon.merlyn.invalid> (permalink) |
| References | <4faaf6f9$0$286$14726298@news.sunsite.dk> |
In comp.lang.javascript message <4faaf6f9$0$286$14726298@news.sunsite.dk >, Wed, 9 May 2012 23:00:02, FAQ server <javascript@dotinternet.be> posted: > >In particular, non-integer results should not normally be >compared for equality; and non-integer computed results >commonly need rounding; see How do I format a Number as a String with exactly 2 decimal places? [ref 1] > ><URL: http://msdn.microsoft.com/en-us/library/7wkd9z69%28VS.85%29.aspx> ><URL: http://www.merlyn.demon.co.uk/js-misc0.htm#DW4> > >Otherwise, use `Math.round` on the results of expressions which >should be of integer value. In the second URL, misc0 should now be exact . -- (c) John Stockton, nr London, UK. ?@merlyn.demon.co.uk Turnpike v6.05. Website <http://www.merlyn.demon.co.uk/> - w. FAQish topics, links, acronyms PAS EXE etc. : <http://www.merlyn.demon.co.uk/programs/> - see in 00index.htm Dates - miscdate.htm estrdate.htm js-dates.htm pas-time.htm critdate.htm etc.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Find similar | Unroll thread
FAQ Topic - Why does simple decimal arithmetic give strange results? (2012-05-10) "FAQ server" <javascript@dotinternet.be> - 2012-05-09 23:00 +0000 Re: FAQ Topic - Why does simple decimal arithmetic give strange results? (2012-05-10) Dr J R Stockton <reply1219@merlyn.demon.co.uk.not.invalid> - 2012-05-11 22:27 +0100
csiph-web