{"ScriptPreparationCode":"var random = new Float64Array(1000);\r\nvar lSin = new Float64Array(1000);\r\nvar lCos = new Float64Array(1000);\r\nfor (let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n random[i] = Math.random() * 1000000;\r\n}\r\nfor (let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n lSin[i] = Math.sin(i * Math.PI / 1000);\r\n lCos[i] = Math.sin(i * Math.PI / 1000);\r\n}\r\n\r\nfunction fastCos(x) {\r\n x \u002B= 1.57079632;\r\n x -= ((x \u003E 3.14159265) ? 6.28318530 : 0);\r\n return (x \u003C 0) ? (1.27323954 * x) \u002B (0.40528473 * x * x) : (1.27323954 * x) - (0.40528473 * x * x);\r\n}\r\n\r\nfunction fastSin(x) {\r\n x -= ((x \u003E 3.14159265) ? 6.28318530 : 0);\r\n return (x \u003C 0) ? (1.27323954 * x) \u002B (0.40528473 * x * x) : (1.27323954 * x) - (0.40528473 * x * x);\r\n}\r\n\r\nfunction lookupSin(x) {\r\n return lSin[Math.round((x % 1000) * 1000) / 1000];\r\n}\r\n\r\nfunction lookupCos(x) {\r\n return lSin[Math.round((x % 1000) * 1000) / 1000];\r\n}","TestCases":[{"Name":"Math.sin","Code":"for (let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n Math.sin(random[i]);\r\n}","IsDeferred":false},{"Name":"Math.cos","Code":"for (let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n Math.cos(random[i]);\r\n}","IsDeferred":false},{"Name":"fastSin","Code":"for (let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n fastSin(random[i]);\r\n}","IsDeferred":false},{"Name":"fastCos","Code":"for (let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n fastCos(random[i]);\r\n}","IsDeferred":false},{"Name":"lookupSin","Code":"for (let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n lookupSin(random[i]);\r\n}","IsDeferred":false},{"Name":"lookupCos","Code":"for (let i = 0; i \u003C 1000; i\u002B\u002B) {\r\n lookupCos(random[i]);\r\n}","IsDeferred":false}]}