{"ScriptPreparationCode":"const PI = Math.PI;\r\nfunction invertAngleBranch(angle) {\r\n if (angle \u002B PI \u003E PI) return (angle - PI)\r\n else return angle \u002B PI \r\n};\r\nfunction invertAngleBranchless(angle) {\r\n return (angle \u002B PI \u003E PI) * (angle - PI) \u002B (angle \u002B PI \u003C= PI) * (angle \u002B PI);\r\n};\r\nfunction invertAngleBranchlessC1(angle) {\r\n let tmp = angle \u002B PI;\r\n return (tmp \u003E PI) * (angle - PI) \u002B (tmp \u003C= PI) * tmp;\r\n};\r\nlet tmp2 = NaN; //initialize with float for v8\r\nfunction invertAngleBranchlessC2(angle) {\r\n tmp2 = angle \u002B PI;\r\n return (tmp2 \u003E PI) * (angle - PI) \u002B (tmp2 \u003C= PI) * tmp2;\r\n};\r\nvar rnd = Math.random;","TestCases":[{"Name":"branched","Code":"return invertAngleBranch(rnd());","IsDeferred":false},{"Name":"branchless","Code":"return invertAngleBranchless(rnd());","IsDeferred":false},{"Name":"branchless in-scope caching","Code":"return invertAngleBranchlessC1(rnd());","IsDeferred":false},{"Name":"branchless out of scope caching","Code":"return invertAngleBranchlessC2(rnd());","IsDeferred":false}]}