Changes between Initial Version and Version 2 of Ticket #1193


Ignore:
Timestamp:
Mar 3, 2012, 2:03:31 AM (12 years ago)
Author:
historic_bruno
Comment:

Updated title and description since fixed point is no longer the focus.

Also [11220] is relevant, it introduced a new rmgen function GetAngle, which calls Math.acos. I don't know if acos is even a problem, I simply mentioned all the trig functions :)

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #1193

    • Property Owner changed from historic_bruno to Jonathan Waller
    • Property Summary Replace SpiderMonkey's trig functions with safe fixed-point versionsReplace SpiderMonkey's trig functions with platform consistent versions
  • Ticket #1193 – Description

    initial v2  
    1 As Philip reported on [https://bugzilla.mozilla.org/show_bug.cgi?id=531915 Bugzilla], there are differences in !SpiderMonkey's floating point [https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Math Math] functions on different platforms. Even a small discrepancy can cause OOS errors in multiplayer games, if those functions are used in e.g. simulation, map generation, or AI code. We already use fixed point approximations for `sin`/`cos` and `atan2` in the engine, but not yet for scripts. Currently no scripts appear to use `atan`, `acos`, or `asin`.
     1As Philip reported on [https://bugzilla.mozilla.org/show_bug.cgi?id=531915 Bugzilla], there are differences in !SpiderMonkey's floating point [https://developer.mozilla.org/en/JavaScript/Reference/Global_Objects/Math Math] functions on different platforms. Even a small discrepancy can cause OOS errors in multiplayer games, if those functions are used in e.g. simulation, map generation, or AI code. ~~We already use fixed point approximations for `sin`/`cos` and `atan2` in the engine, but not yet for scripts.~~ Currently no scripts appear to use `atan`, `acos`, or `asin`.
    22
    33(There may also be differences in `pow` and `exp` which we do use rarely, but I wasn't able to reproduce them with the above test cases.)