{"ScriptPreparationCode":"const hypotTable = [];\r\nfor(let i = 0; i \u003C 10000; i\u002B\u002B) {\r\n hypotTable[i] = Math.sqrt(i);\r\n}\r\nfunction hypotLookup(i) {\r\n return hypotTable[i];\r\n}","TestCases":[{"Name":"Math.sqrt()","Code":"const RAD_PER_DEG = Math.PI / 180;\r\nfor(let i = 0; i \u003C 360; i \u002B= 0.1) {\r\n const r = i * RAD_PER_DEG;\r\n const d = (100 / 360) * i;\r\n const x = Math.sin(r) * d;\r\n const y = Math.cos(r) * d;\r\n const s = Math.sqrt(x * x \u002B y * y);\r\n}","IsDeferred":false},{"Name":"Alpha max plus beta min","Code":"const ALPHA = 0.96043387010342;\r\nconst BETA = 0.397824734759316;\r\nconst RAD_PER_DEG = Math.PI / 180;\r\nfor(let i = 0; i \u003C 360; i \u002B= 0.1) {\r\n const r = i * RAD_PER_DEG;\r\n const d = (100 / 360) * i;\r\n const x = Math.abs(Math.sin(r) * d);\r\n const y = Math.abs(Math.cos(r) * d);\r\n const h = x \u003E y ? ALPHA*x \u002B BETA*y : ALPHA*y \u002B BETA*x;\r\n}","IsDeferred":false},{"Name":"Lookup table","Code":"const RAD_PER_DEG = Math.PI / 180;\r\nfor(let i = 0; i \u003C 360; i \u002B= 0.1) {\r\n const r = i * RAD_PER_DEG;\r\n const d = (100 / 360) * i;\r\n const x = Math.sin(r) * d;\r\n const y = Math.cos(r) * d;\r\n const h = hypotLookup(Math.floor(x * x \u002B y * y));\r\n}","IsDeferred":false},{"Name":"** 0.5","Code":"const RAD_PER_DEG = Math.PI / 180;\r\nfor(let i = 0; i \u003C 360; i \u002B= 0.1) {\r\n const r = i * RAD_PER_DEG;\r\n const d = (100 / 360) * i;\r\n const x = Math.sin(r) * d;\r\n const y = Math.cos(r) * d;\r\n const s = (x * x \u002B y * y) ** 0.5;\r\n}","IsDeferred":false}]}