Re: [Caja] Important new paper: The Need for Capability Policiies
"Mark S. Miller" <[email protected]> Tue, 27 Aug 2013 21:24:49 -0700
| Newsgroups | gmane.comp.lang.e.general |
|---|---|
| Message-ID | <CABHxS9j-R3JBqwUCfVJPxM1LidJ5AQ=vb9dqKVfLO42Hke14wg@mail.gmail.com> |
The computed sum of balance+amount is in range, and is returned by Nat(balance+amount). But this computed sum is not the sum of balance and amount. Note that this is fixed in current SES by admitting 2**53-1 but not 2**53, and is reflected in the definitions of MAX_SAFE_INTEGER and isSafeInteger in EcmaScript 6. On Tue, Aug 27, 2013 at 8:03 PM, Karp, Alan H <[email protected]> wrote: > Daira Hopwood wrote: > > > > Nat(balance) > > Nat(amount) > > Nat(balance + amount) > > Nat(balance) + Nat(amount) === Nat(balance + amount) > > > > but Nat(balance) + Nat(amount) does not represent the same value as > balance + > > amount! > > > Isn't the surprise really that Nat(balance+amount) doesn't throw but > balance+amount is not in range? > > ________________________ > Alan Karp > Principal Scientist > Enterprise Services, Office of the CTO > Hewlett-Packard Company > 1501 Page Mill Road > Palo Alto, CA 94304 > (650) 857-3967, fax (650) 857-7029 > http://www.hpl.hp.com/personal/Alan_Karp > > > > _______________________________________________ > e-lang mailing list > [email protected] > http://www.eros-os.org/mailman/listinfo/e-lang > -- Cheers, --MarkM _______________________________________________ e-lang mailing list [email protected] http://www.eros-os.org/mailman/listinfo/e-lang