On 6/23/18, 12:15 PM, "Harbs" <[email protected]> wrote:

    > 
    > We may need to understand which modern browsers that we support (IE11, 
Chrome, FireFox, Android, IOS Safari) might have these issues.  We might have 
to generate a "safeAdd()" instead of just "+" when we know the types are all 
integers.  And implement smarter coercions as described in the article you 
linked to.  Which browser(s) did you test with?
    
    Chrome, Firefox and Safari. All on Mac.
    
    I’ve used BinaryData pretty extensively and I haven’t had issues. I don’t 
understand why MD5 was failing, but it seems like whatever the issue is is 
pretty fringe.
    
Maybe.  AIUI, floating point as an approximation for int and uint can be lossy. 
 Probably for sure around overflow.  I'm wondering if it is also an issue with 
certain values after a series of calculations.

Some experiments would be to have some code generate a huge array of random 
ints and then have AS code add them, and JS code add them and see if the 
results match.  Or have just a JS app that generates numbers and add them via 
regular add vs safeAdd.  If you do, say, 10 calculations and end up with 
different results, that may not be 'fringe'.

My 2 cents,
-Alex


Reply via email to