Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Javascript Math problem

Received: by 10.68.201.168 with SMTP id kb8mr657479pbc.3.1335773209135;
        Mon, 30 Apr 2012 01:06:49 -0700 (PDT)
MIME-Version: 1.0
Path: r9ni115050pbh.0!nntp.google.com!news1.google.com!news.glorb.com!feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post2.news.xs4all.nl!newszilla.xs4all.nl!not-for-mail
Newsgroups: comp.lang.javascript
Subject: Re: Javascript Math problem
From: "Evertjan." <exjxw.hannivo...@interxnl.net>
References: <jnf7b8$7d0$1@wieslauf.sub.de> <jnfabu$g0r$1@news.albasani.net> <Ys4py0cH+ZnPFwuy@invalid.uk.co.demon.merlyn.invalid>
Message-ID: <XnsA04566E10D1CBeejj99@194.109.133.133>
User-Agent: Xnews/2009.05.01
Date: 30 Apr 2012 08:06:48 GMT
Lines: 25
NNTP-Posting-Host: 188.142.36.213
X-Trace: 1335773208 dreader34.news.xs4all.nl 26510 ehannivo/188.142.36.213:65173

Dr J R Stockton wrote on 29 apr 2012 in comp.lang.javascript:

> In comp.lang.javascript message <jnfabu$g0...@news.albasani.net>, Sat,
> 28 Apr 2012 01:33:18, Stefan Weiss <krewech...@gmail.com> posted:
> 
>>
>>There are other methods, too:
>>
>>  parseInt(5/3)
>                      Ooo nasty.
>>  ~~(5/3)
>>  (5/3) >> 0
>>  (5/3) | 0
> 
> Those only give integer division if the magnitude of the result is less
> than 2^31 (2^31-0.5?).  Math.floor(X/Y) will work for all possible
> values of X & Y, but the result will be rounded to 53 significant bits.
> Neither of those seems likely to affect the OP.

The text "A maximum of 2^30 per customer" should be added to OP's page.

-- 
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)