{"ScriptPreparationCode":"var betterparse1 = (s) =\u003E {\r\n // special case handling of literal \u0022nan\u0022 values\r\n s = s.toLowerCase()\r\n if (s === \u0022nan\u0022 || s === \u0022-nan\u0022 || s === \u0022\u002Bnan\u0022) return NaN;\r\n\r\n const v = Number(s);\r\n if (isNaN(v)) return null;\r\n return v; // guaranteed to be a number that isn\u0027t NaN (but it could be Infinity)\r\n}\r\n\r\nvar betterparse2 = (s) =\u003E {\r\n // special case handling of literal \u0022nan\u0022 values\r\n switch (s.toLowerCase()) {\r\n case \u0022nan\u0022:\r\n case \u0022\u002Bnan\u0022:\r\n case \u0022-nan\u0022:\r\n return NaN;\r\n }\r\n\r\n const v = Number(s);\r\n if (isNaN(v)) return null;\r\n return v; // guaranteed to be a number that isn\u0027t NaN (but it could be Infinity)\r\n}\r\n\r\nvar betterparse3 = (s) =\u003E {\r\n switch (s) {\r\n case \u0022nan\u0022:\r\n case \u0022\u002Bnan\u0022:\r\n case \u0022-nan\u0022:\r\n case \u0022NaN\u0022:\r\n case \u0022\u002BNaN\u0022:\r\n case \u0022-NaN\u0022:\r\n case \u0022NAN\u0022:\r\n case \u0022\u002BNAN\u0022:\r\n case \u0022-NAN\u0022:\r\n return NaN;\r\n }\r\n\r\n const v = Number(s);\r\n if (isNaN(v)) return null;\r\n return v; // guaranteed to be a number that isn\u0027t NaN (but it could be Infinity)\r\n}\r\n\r\nvar numbers = [\r\n \u00220.327257347992157\u0022,\r\n \u00220.03432947163666622\u0022,\r\n \u00220.19054570522014136\u0022,\r\n \u00220.757924325036481\u0022,\r\n \u00220.8756495827150409a\u0022,\r\n \u00220.8735223786857549\u0022,\r\n \u00220.16193166094499645\u0022,\r\n \u00220.3264840252931367\u0022,\r\n \u00220.8976069804818312\u0022,\r\n \u00220.05823493932681134\u0022,\r\n \u00220.9467170087775896\u0022,\r\n \u0022-NAN\u0022,\r\n \u00220.3411182773746414\u0022,\r\n \u00220.04273697798010612\u0022,\r\n \u00220.4599136076509416\u0022,\r\n \u00220.20091841618072792\u0022,\r\n \u00220.7481790478470371\u0022,\r\n \u00220.631090589202488\u0022,\r\n \u00220.6134529272259946\u0022,\r\n \u00220.7603019894148221\u0022,\r\n \u0022NaN\u0022,\r\n \u00220.6848452952886251\u0022,\r\n \u00220.8958221077246171\u0022,\r\n \u00220.25265763361084415\u0022,\r\n \u00220.31674875667294267\u0022,\r\n \u00220.6097282060031768\u0022,\r\n \u00220.18265134080263656\u0022,\r\n \u0022\u0022,\r\n \u00220.36918250030559796\u0022,\r\n \u00220.6053164008875728\u0022,\r\n \u00220.39730683023873337\u0022,\r\n \u00220.3842390211966774\u0022,\r\n \u00220.5573411172870547\u0022,\r\n \u0022b0.9682358615780161\u0022,\r\n \u00220.8304492155340027\u0022,\r\n \u00220.1464933423860405\u0022,\r\n \u00220.26340608593749726\u0022,\r\n \u00220.22961410590320552\u0022,\r\n \u00220.5908943588693252\u0022,\r\n \u00220.9002256812711459\u0022,\r\n \u00220.8092150249145922\u0022,\r\n \u00220.060955373278098635\u0022,\r\n \u00220.04253202590541827\u0022,\r\n \u00220.4994387689297176\u0022,\r\n \u00220.05581701909464065\u0022,\r\n \u00220.01981156164547493\u0022,\r\n \u00220.12833340391640402\u0022,\r\n \u0022NaN\u0022,\r\n \u00220.465050111507027\u0022,\r\n \u00220.7636969664726854\u0022,\r\n \u00220.12864577854450943\u0022,\r\n \u00220.47847392755062357\u0022,\r\n \u00220.09313181128668402\u0022,\r\n \u00220.9473000507174908\u0022,\r\n \u00220.869188703023482\u0022,\r\n \u00220.8476349098291822\u0022,\r\n \u00220.5060602000203033\u0022,\r\n \u00220.013594390816120128\u0022,\r\n \u0022NaN\u0022,\r\n \u00220.7159481390807573\u0022,\r\n \u00220.9785693256013818\u0022,\r\n \u00220.6567281886346458\u0022,\r\n \u00220.2741853723406986\u0022,\r\n \u00220.08134454100211075\u0022,\r\n \u00220.16720862159533767\u0022,\r\n \u00220.043608322437359126\u0022,\r\n \u0022NaN\u0022,\r\n \u00220.7552857256174752\u0022,\r\n \u00220.10191443424045554\u0022,\r\n \u00220.6683869703195341\u0022,\r\n \u00220.1672931087637095\u0022,\r\n \u00220.029535244526663784\u0022,\r\n \u0022\u002Bnan\u0022,\r\n \u00220.9038827319929565\u0022,\r\n \u00220.9580917987405422\u0022,\r\n \u00220.33091435472002173\u0022,\r\n \u00220.6400233200277594\u0022,\r\n \u0022dfsgsegrsert\u0022,\r\n \u00220.39558554444217287\u0022,\r\n \u00220.6817925156801317\u0022,\r\n \u00220.7543418101559722\u0022,\r\n \u00220.8112443776211025\u0022,\r\n \u00220.4746963996832825\u0022,\r\n \u00220.4970739670176436\u0022,\r\n \u00220.6522344216702008\u0022,\r\n \u00220.37851252385904544\u0022,\r\n \u00220.9145354809581934\u0022,\r\n \u00220.17983840765587844\u0022,\r\n \u00220.5632683939437284\u0022,\r\n \u00220.2581147343499265\u0022,\r\n \u00220.5593935878390675\u0022,\r\n \u00220.14874151599102725\u0022,\r\n \u00220.32513087795909557\u0022,\r\n \u00220.253zxxxzz77838496\u0022,\r\n \u00220.9299155933721135\u0022,\r\n \u00220.7609785538234373\u0022,\r\n \u00220.6181474622979708\u0022,\r\n \u00220.9775946358910067\u0022,\r\n \u00220.07623977301767593\u0022,\r\n \u00220.7534482258293359\u0022,\r\n];","TestCases":[{"Name":"Betterparse type 1","Code":"let x;\r\nfor (const s of numbers) {\r\n x = betterparse1(s);\r\n}","IsDeferred":false},{"Name":"Betterparse type 2","Code":"let x;\r\nfor (const s of numbers) {\r\n x = betterparse2(s);\r\n}","IsDeferred":false},{"Name":"Standard parsing (incorrect)","Code":"let x;\r\nfor (const s of numbers) {\r\n x = Number(s);\r\n}","IsDeferred":false},{"Name":"Standard parsing 2 (incorrect)","Code":"let x;\r\nfor (const s of numbers) {\r\n x = parseFloat(s);\r\n}","IsDeferred":false},{"Name":"Betterparse type 3","Code":"let x;\r\nfor (const s of numbers) {\r\n x = betterparse2(s);\r\n}","IsDeferred":false}]}