mirror of
https://github.com/anomalyco/opencode.git
synced 2026-11-29 11:42:17 +00:00
feat(codemode): add URI functions, toExponential, Math.sumPrecise, f16round and copyWithin
- encodeURI/encodeURIComponent/decodeURI/decodeURIComponent with the reference's URIError messages. - Number formatting follows JavaScriptCore: toString(radix) ports its exact integer digits and shortest-fraction algorithm, toExponential and toPrecision round half up on the exact value, toFixed keeps the sign of a negative that rounds to zero, and number-to-string picks the even digit when two shortest forms tie. Range errors use the host messages. - Math.sumPrecise sums exactly and rounds once; Math.f16round rounds straight from the double; Array.prototype.copyWithin. Number-to-string and its tie rule live in value.rs, so integers from 2^53 up print their shortest digits instead of every digit. copyWithin converts its arguments through ToPrimitive like the other Array methods. Number-to-string decides ties in 128-bit integer arithmetic. test262: the reference's skipped.txt drops three copyWithin files the reference passes.
This commit is contained in:
parent
00964d83de
commit
ebb15aeb19
17 changed files with 1389 additions and 179 deletions
|
|
@ -0,0 +1,10 @@
|
|||
const out = []
|
||||
out.push(Math.sumPrecise([1e20, 0.1, -1e20]), Math.sumPrecise([0.1, 0.2, 0.3]), Math.sumPrecise([]), Object.is(Math.sumPrecise([-0, -0]), -0), Math.sumPrecise([1e308, 1e308, -1e308]), Math.sumPrecise([Infinity, 1]), Math.sumPrecise([Infinity, -Infinity]), Math.sumPrecise([NaN]), Math.sumPrecise(new Set([5e-324, 5e-324])), Math.sumPrecise([1, 2 ** 53, 1]), Math.sumPrecise([1.7976931348623157e308, 1e292]))
|
||||
try { Math.sumPrecise([1, "2"]) } catch (e) { out.push(e.name, e.message) }
|
||||
try { Math.sumPrecise(5) } catch (e) { out.push(e.name) }
|
||||
out.push([1.337, 65504, 65520, 65519.99, 5.960464477539063e-8, 2.9802322387695312e-8, 2.98023223876953126e-8, -0, 0.1, 1e-10, -1.5, 1.0009765625, 1.00048828125, 1.00146484375].map(Math.f16round))
|
||||
out.push([1, 2, 3, 4, 5].copyWithin(0, 3), [1, 2, 3, 4, 5].copyWithin(-2), [1, 2, 3, 4, 5].copyWithin(1, 0, 3), [1, 2, 3, 4, 5].copyWithin(0, -3, -1), [1, 2, 3].copyWithin(5, 0))
|
||||
try { Object.freeze([1, 2]).copyWithin(0, 1) } catch (e) { out.push(e.name) }
|
||||
let seed = 9; const rnd = () => { seed = (seed * 1103515245 + 12345) % 2147483648; return seed / 2147483648 }
|
||||
for (let i = 0; i < 50; i++) { const xs = []; for (let j = 0; j < 8; j++) xs.push((rnd() - 0.5) * 10 ** Math.floor(rnd() * 40 - 20)); out.push(Math.sumPrecise(xs)) }
|
||||
return out.map(String)
|
||||
|
|
@ -0,0 +1,78 @@
|
|||
{
|
||||
"bindings": {},
|
||||
"ok": true,
|
||||
"value": [
|
||||
"0.1",
|
||||
"0.6",
|
||||
"0",
|
||||
"true",
|
||||
"1e+308",
|
||||
"Infinity",
|
||||
"NaN",
|
||||
"NaN",
|
||||
"5e-324",
|
||||
"9007199254740994",
|
||||
"Infinity",
|
||||
"TypeError",
|
||||
"Math.sumPrecise expects an iterable of numbers.",
|
||||
"TypeError",
|
||||
"1.3369140625,65504,Infinity,65504,5.960464477539063e-8,0,0,0,0.0999755859375,0,-1.5,1.0009765625,1,1.001953125",
|
||||
"4,5,3,4,5",
|
||||
"1,2,3,1,2",
|
||||
"1,1,2,3,5",
|
||||
"3,4,3,4,5",
|
||||
"1,2,3",
|
||||
"TypeError",
|
||||
"-2181596466658.771",
|
||||
"-331533353.23756975",
|
||||
"-15372578514565086",
|
||||
"-249882012681486.7",
|
||||
"-46955845475194650",
|
||||
"-29457826862420710",
|
||||
"-656325007565.9758",
|
||||
"257556915283868540",
|
||||
"32125841316491.71",
|
||||
"-476319262556728600",
|
||||
"-3389744585216918000",
|
||||
"1422187089920044000",
|
||||
"-1018150559103488900",
|
||||
"4032076597241135.5",
|
||||
"1162632706640023000",
|
||||
"-244257626599569920",
|
||||
"-1816714267.6425529",
|
||||
"14379285411665348",
|
||||
"-61269897615907390",
|
||||
"-29503730034609500",
|
||||
"-652031328519.4344",
|
||||
"257589041125120420",
|
||||
"245869101.32956386",
|
||||
"-3866063830673691600",
|
||||
"1422187072574220000",
|
||||
"-1018134094774723100",
|
||||
"-16464328765869.13",
|
||||
"4032076597241193.5",
|
||||
"1162632707102717400",
|
||||
"-244257627067049600",
|
||||
"-1812009473.685677",
|
||||
"14226373033434494",
|
||||
"-61116985237596100",
|
||||
"-29504382070084276",
|
||||
"257556915287349400",
|
||||
"32125841917276.05",
|
||||
"-476319262556731700",
|
||||
"-3389744585213189000",
|
||||
"1422187089916318700",
|
||||
"-1018134094774723100",
|
||||
"-16464328736780.127",
|
||||
"1166664369106291200",
|
||||
"414594062085.0411",
|
||||
"-244257627067473440",
|
||||
"-147147296080.04468",
|
||||
"14207717990877908",
|
||||
"-90602404880833630",
|
||||
"-162044921510.45975",
|
||||
"257556915283866460",
|
||||
"32125841318426.562"
|
||||
],
|
||||
"logs": []
|
||||
}
|
||||
|
|
@ -0,0 +1,10 @@
|
|||
let seed = 12345
|
||||
const rnd = () => { seed = (seed * 1103515245 + 12345) % 2147483648; return seed / 2147483648 }
|
||||
const out = []
|
||||
for (let i = 0; i < 400; i++) {
|
||||
const x = (rnd() - 0.5) * 10 ** Math.floor(rnd() * 40 - 20)
|
||||
const r = 2 + Math.floor(rnd() * 35)
|
||||
const d = Math.floor(rnd() * 20)
|
||||
out.push([x.toString(r), x.toExponential(d), x.toPrecision(d + 1), x.toFixed(d), x.toExponential(), String(x)].join("|"))
|
||||
}
|
||||
return out
|
||||
|
|
@ -0,0 +1,407 @@
|
|||
{
|
||||
"bindings": {},
|
||||
"ok": true,
|
||||
"value": [
|
||||
"0.00000072iklldalg5m|1.5515404846519232148e-9|1.5515404846519232148e-9|0.0000000015515404847|1.5515404846519232e-9|1.5515404846519232e-9",
|
||||
"536405.36526|1.79461479187011719e+5|179461.479187011719|179461.47918701171875000|1.7946147918701172e+5|179461.47918701172",
|
||||
"7942iqnml.9i7|2.072738e+12|2.072738e+12|2072738409042.358398|2.0727384090423584e+12|2072738409042.3584",
|
||||
"0.0000000000h3hejbe2c8al|2.9390e-14|2.9390e-14|0.0000|2.938960790634155e-14|2.938960790634155e-14",
|
||||
"-r3cqveo.9vm|-2.9105159640312195e+10|-29105159640.312195|-29105159640.3121948242187500|-2.9105159640312195e+10|-29105159640.312195",
|
||||
"-0.02mddhmfpmieo|-3.8866138e-3|-0.0038866138|-0.0038866|-3.8866138458251956e-3|-0.0038866138458251956",
|
||||
"-0.0000a0uxubkapwg|-2.20682740211486817e-7|-2.20682740211486817e-7|-0.00000022068274021|-2.2068274021148682e-7|-2.2068274021148682e-7",
|
||||
"-0.0025bmrlhl9qmj|-8.073e-5|-0.00008073|-0.000|-8.073103427886963e-5|-0.00008073103427886963",
|
||||
"-0.00000008b55390e5c3487|-3.4168872237e-9|-3.4168872237e-9|-0.0000000034|-3.4168872237205507e-9|-3.4168872237205507e-9",
|
||||
"0.03jn4h86d373p|4.7297e-3|0.0047297|0.0047|4.729743003845215e-3|0.004729743003845215",
|
||||
"-9mgm8mk8d.3c|-6.398246e+12|-6.398246e+12|-6398245692253.113281|-6.398245692253113e+12|-6398245692253.113",
|
||||
"1iel1ione.o92|3.58e+11|3.58e+11|357974767684.94|3.579747676849365e+11|357974767684.9365",
|
||||
"0.00000000000025eneaofc8g2|8.9247137e-19|8.9247137e-19|0.0000000|8.924713730812073e-19|8.924713730812073e-19",
|
||||
"0.000000000b7a7c2c59ecb23|1.99660420e-11|1.99660420e-11|0.00000000|1.9966042041778566e-11|1.9966042041778566e-11",
|
||||
"-e0bgf7c656d5d|-8e+15|-8e+15|-8180892467498779|-8.180892467498779e+15|-8180892467498779",
|
||||
"-0.00000000000ejij2ohi866|-2e-16|-2e-16|-0|-2.4813542142510416e-16|-2.4813542142510416e-16",
|
||||
"-0.00000000eb0248af9c3a6|-2.1374e-10|-2.1374e-10|-0.0000|-2.1373936906456948e-10|-2.1373936906456948e-10",
|
||||
"0.0c2chg3icf1b5|3.0330565571784974e-2|0.030330565571784974|0.0303305655717850|3.0330565571784974e-2|0.030330565571784974",
|
||||
"100010100101001001111.1000111010100011|1.13313555717e+6|1133135.55717|1133135.55717468262|1.1331355571746826e+6|1133135.5571746826",
|
||||
"-0.171l53liaj1mh|-5.13183e-2|-0.0513183|-0.05132|-5.131828784942627e-2|-0.05131828784942627",
|
||||
"-64072331548684241|-1.1960148811e+16|-1.1960148811e+16|-11960148811340332.0000000000|-1.1960148811340332e+16|-11960148811340332",
|
||||
"111111011110.100111011110100001|4.062616825104e+3|4062.616825104|4062.616825103760|4.0626168251037598e+3|4062.6168251037598",
|
||||
"0.000165jep9ehrjm|1.4892315864563e-6|0.0000014892315864563|0.0000014892316|1.4892315864562989e-6|0.0000014892315864562989",
|
||||
"-9zespew.z4zq|-2.173221111e+10|-2.173221111e+10|-21732211112.976074219|-2.1732211112976074e+10|-21732211112.976074",
|
||||
"-15.o6a947hcg2|-3.09702634811401367e+1|-30.9702634811401367|-30.97026348114013672|-3.0970263481140137e+1|-30.970263481140137",
|
||||
"141104020.310301340034213|7.223856449127197266e+5|722385.6449127197266|722385.644912719726562500|7.223856449127197e+5|722385.6449127197",
|
||||
"-0.0000000008569b773g4g81|-4.1254329681396482e-12|-4.1254329681396482e-12|-0.0000000000041254|-4.125432968139648e-12|-4.125432968139648e-12",
|
||||
"-19023704528808.594|-1.9023704528808594e+13|-19023704528808.594|-19023704528808.5937500000000000|-1.9023704528808594e+13|-19023704528808.594",
|
||||
"-0.0000000000000101111101110011010111000010100011110101110000101001|-9.102881e-5|-0.00009102881|-0.000091|-9.102880954742432e-5|-0.00009102880954742432",
|
||||
"44n7elmgn.ss5|2.0838201045989990234e+12|2083820104598.9990234|2083820104598.9990234375000000000|2.083820104598999e+12|2083820104598.999",
|
||||
"103a217176703.4b8|9e+12|9e+12|9154367446899|9.154367446899414e+12|9154367446899.414",
|
||||
"-2.anl427lnf|-2.4581286683679e+0|-2.4581286683679|-2.4581286683679|-2.4581286683678627e+0|-2.4581286683678627",
|
||||
"0.09liaa229e9eb|1.719965934753418108e-2|0.01719965934753418108|0.017199659347534181|1.719965934753418e-2|0.01719965934753418",
|
||||
"0.0000000000017303b8g54197|1.8219e-16|1.8219e-16|0.0000|1.821894645690918e-16|1.821894645690918e-16",
|
||||
"0.000506348ccc7320c3|1.7636051774025e-4|0.00017636051774025|0.0001763605177|1.7636051774024962e-4|0.00017636051774024962",
|
||||
"-0.0000014445471763610841|-1.444547e-6|-0.000001444547|-0.000001|-1.4445471763610841e-6|-0.0000014445471763610841",
|
||||
"-3.sff32fmir7|-3.81259679794312e+0|-3.81259679794312|-3.81259679794312|-3.8125967979431152e+0|-3.8125967979431152",
|
||||
"88hm8k27.tnpd|1.812232e+11|1.812232e+11|181223154067.993164|1.8122315406799316e+11|181223154067.99316",
|
||||
"-0.0002521001441351023205|-2.23268270492553737e-3|-0.00223268270492553737|-0.00223268270492554|-2.2326827049255374e-3|-0.0022326827049255374",
|
||||
"-0.0000000000000009bjhk8a23f1a|-1.5516472e-21|-1.5516472e-21|-0.0000000|-1.5516471862792968e-21|-1.5516471862792968e-21",
|
||||
"-0.0000000000000000000125022150552025320113|-4.03e-16|-4.03e-16|-0.00|-4.0317249298095705e-16|-4.0317249298095705e-16",
|
||||
"271ofg.0353ff|2.6995790e+7|26995790|26995790.0047302|2.6995790004730225e+7|26995790.004730225",
|
||||
"-0.038jntdo4xvm|-2.813441e-3|-0.002813441|-0.002813|-2.813440561294556e-3|-0.002813440561294556",
|
||||
"-71d08d6ba623c.6|-4.0468049049377443750e+14|-404680490493774.43750|-404680490493774.4375000000000000000|-4.0468049049377444e+14|-404680490493774.44",
|
||||
"-0.00000000370a2lk0ailf7|-2.7492904663085937484e-12|-2.7492904663085937484e-12|-0.0000000000027492905|-2.7492904663085937e-12|-2.7492904663085937e-12",
|
||||
"-6a658153.5479b3|-2.4646139144897461e+8|-246461391.44897461|-246461391.4489746093750000|-2.464613914489746e+8|-246461391.4489746",
|
||||
"-0.5jqhd8cgneb|-2.1260213852e-1|-0.21260213852|-0.2126021385|-2.126021385192871e-1|-0.2126021385192871",
|
||||
"1112379.12723283|1.95e+6|1.95e+6|1950364.11|1.950364112854004e+6|1950364.112854004",
|
||||
"0.0000000000000000000000000433241235541115242105|2.694230378e-20|2.694230378e-20|0.000000000|2.6942303776741026e-20|2.6942303776741026e-20",
|
||||
"-0.00000ban4b88ep3b|-3.696441650391e-8|-3.696441650391e-8|-0.000000036964|-3.6964416503906246e-8|-3.6964416503906246e-8",
|
||||
"0.00000032c156712430b|7.69958496e-9|7.69958496e-9|0.00000001|7.6995849609375e-9|7.6995849609375e-9",
|
||||
"0.000001di05ss66arp|9.049224853515625343e-10|9.049224853515625343e-10|0.000000000904922485|9.049224853515625e-10|9.049224853515625e-10",
|
||||
"0.000c1c7ifepfti|1.14853e-5|0.0000114853|0.00001|1.148529052734375e-5|0.00001148529052734375",
|
||||
"-0.00024ae242c179d1d8|-4.573440551757812793e-5|-0.00004573440551757812793|-0.000045734405517578|-4.573440551757813e-5|-0.00004573440551757813",
|
||||
"0.0000000000000000e0a7b014ce1f4|4.7572553e-20|4.7572553e-20|0.0000000|4.75725531578064e-20|4.75725531578064e-20",
|
||||
"-30a0b6a00008b4.2|-3.2846939563751218750e+14|-328469395637512.18750|-328469395637512.1875000000000000000|-3.284693956375122e+14|-328469395637512.2",
|
||||
"64bcrnkjol7jn|2.176506519e+18|2.176506519e+18|2176506519317626880.000000000|2.176506519317627e+18|2176506519317627000",
|
||||
"16ba49b5680501.09|1.693069934844971e+14|169306993484497.1|169306993484497.062500000000000|1.6930699348449706e+14|169306993484497.06",
|
||||
"116g.2i1ef348f|9.8e+3|9.8e+3|9844.1|9.844136238098145e+3|9844.136238098145",
|
||||
"11000011101010001100010111001.1110110001101101|4.1032722592354e+8|410327225.92354|410327225.9235382080078|4.103272259235382e+8|410327225.9235382",
|
||||
"-k6o1d2gk.a04h|-2.1187674999237060547e+11|-211876749992.37060547|-211876749992.3706054687500000000|-2.118767499923706e+11|-211876749992.3706",
|
||||
"110487030440803.855|2.56e+13|2.56e+13|25574803352355.96|2.5574803352355957e+13|25574803352355.957",
|
||||
"-6fqp8c36dhc.f|-2.75529e+15|-2.75529e+15|-2755293250083923.50000|-2.7552932500839235e+15|-2755293250083923.5",
|
||||
"-169sqhhoko.1h|-1.7681074142456e+13|-17681074142456|-17681074142456.0546875000000|-1.7681074142456055e+13|-17681074142456.055",
|
||||
"0.000000000gkoeib6l3s7|2.0339250564575195e-14|2.0339250564575195e-14|0.0000000000000203|2.0339250564575195e-14|2.0339250564575195e-14",
|
||||
"0.000000000000015404441610232561554|2.7e-12|2.7e-12|0.0|2.650836706161499e-12|2.650836706161499e-12",
|
||||
"-0.000000fb52ecc09bfg4|-2.552517951e-8|-2.552517951e-8|-0.000000026|-2.5525179505348204e-8|-2.5525179505348204e-8",
|
||||
"-0.000006al84ib655dm|-4.374043941497802838e-8|-4.374043941497802838e-8|-0.000000043740439415|-4.374043941497803e-8|-4.374043941497803e-8",
|
||||
"-3.132909536361694e-20|-3.132909536361694e-20|-3.132909536361694e-20|-0.000000000000000|-3.132909536361694e-20|-3.132909536361694e-20",
|
||||
"-6d.1k3k730h738|-1.39e+2|-139|-139.09|-1.3909339904785156e+2|-139.09339904785156",
|
||||
"0.0046elikif681d|3.093085587025e-4|0.0003093085587025|0.000309308559|3.093085587024689e-4|0.0003093085587024689",
|
||||
"-0.00000000000052a3kg1di54g9|-1.80755257607e-17|-1.80755257607e-17|-0.00000000000|-1.8075525760650633e-17|-1.8075525760650633e-17",
|
||||
"0.0000000001121221102222222110110120120022112|2.7561783790588380397e-5|0.000027561783790588380397|0.0000275617837905884|2.756178379058838e-5|0.00002756178379058838",
|
||||
"29621672630.31006|2.962e+10|2.962e+10|29621672630.310|2.962167263031006e+10|29621672630.31006",
|
||||
"3c6187ae5bb468|1.699573398e+16|1.699573398e+16|16995733976364136.000000000|1.6995733976364136e+16|16995733976364136",
|
||||
"48ea2.c04a41487|4.7127866744995e+5|471278.66744995|471278.6674499511719|4.712786674499512e+5|471278.6674499512",
|
||||
"0.0jbio406f2ic7|2.87737846374512e-2|0.0287737846374512|0.02877378463745|2.8773784637451172e-2|0.028773784637451172",
|
||||
"-0.00000000000000000000002000000210122122011200100120002121|-2.126e-11|-2.126e-11|-0.000|-2.1255922317504884e-11|-2.1255922317504884e-11",
|
||||
"0.05c826971aaa8923|4e-2|0.04|0|3.533467650413513e-2|0.03533467650413513",
|
||||
"-7ehm0em9p0qe4|-3.97856447846e+18|-3.97856447846e+18|-3978564478456973824.00000000000|-3.978564478456974e+18|-3978564478456974000",
|
||||
"4f1i15bd.a0e6|4.7676658630371094e+10|47676658630.371094|47676658630.3710937500000000|4.767665863037109e+10|47676658630.37109",
|
||||
"3263.fb4134j3|4.83e+4|4.83e+4|48278.62|4.827861785888672e+4|48278.61785888672",
|
||||
"0.00002lk1g9nil0m5|2.941036522e-7|2.941036522e-7|0.000000294|2.941036522388458e-7|2.941036522388458e-7",
|
||||
"0.0000022212221102001222202002010210221|4.0634238719940e-3|0.0040634238719940|0.0040634238720|4.063423871994019e-3|0.004063423871994019",
|
||||
"-0.000000000dwvn96jhswc|-3.80544424e-15|-3.80544424e-15|-0.00000000|-3.8054442405700685e-15|-3.8054442405700685e-15",
|
||||
"-0.0000000000004h5ls6mc72w|-5.55210114e-20|-5.55210114e-20|-0.00000000|-5.552101135253907e-20|-5.552101135253907e-20",
|
||||
"3jb0l0kdbe1ad|1.297892332077026e+18|1.297892332077026e+18|1297892332077026304.000000000000000|1.2978923320770263e+18|1297892332077026300",
|
||||
"-0.000000000ojcp424226p|-1.2e-13|-1.2e-13|-0.0|-1.2007045745849608e-13|-1.2007045745849608e-13",
|
||||
"-44ff3522dd6.72|-4.74143117666244531e+12|-4741431176662.44531|-4741431176662.44531250000000000|-4.741431176662445e+12|-4741431176662.445",
|
||||
"0.0000000000001320001365260260623|1.5e-11|1.5e-11|0.0|1.5165817737579346e-11|1.5165817737579346e-11",
|
||||
"9.190b1ihdn1|9.1e+0|9.1|9.1|9.054428339004517e+0|9.054428339004517",
|
||||
"-0.00000000000000031444023002000114412244|-2.227e-11|-2.227e-11|-0.000|-2.2272846102714538e-11|-2.2272846102714538e-11",
|
||||
"-0.000000aqbqofq7h4k|-3.94e-10|-3.94e-10|-0.00|-3.9440292119979863e-10|-3.9440292119979863e-10",
|
||||
"-210000021010201222202010101111.0022|-1.60212218761444e+14|-160212218761444|-160212218761444.09375000000000|-1.602122187614441e+14|-160212218761444.1",
|
||||
"0.00000000000000010010110010000111011110011010011010110101000010110001|1.79e-5|0.0000179|0.00|1.7912936210632324e-5|0.000017912936210632324",
|
||||
"-3lcfm.jd24l8g|-3.0082726478577e+6|-3008272.6478577|-3008272.6478576660156|-3.008272647857666e+6|-3008272.647857666",
|
||||
"-0.028334987163543702|-2.833498716354370e-2|-0.02833498716354370|-0.028334987163544|-2.8334987163543702e-2|-0.028334987163543702",
|
||||
"-0.0000000002baa9b99a4a37224|-4.8328602e-11|-4.8328602e-11|-0.0000000|-4.832860231399536e-11|-4.832860231399536e-11",
|
||||
"-0.000000110030222013022300020030103|-8e-5|-0.00008|-0|-7.70484209060669e-5|-0.0000770484209060669",
|
||||
"0.00000000000006b0a5fca|3.998587727546691978e-18|3.998587727546691978e-18|0.000000000000000004|3.998587727546692e-18|3.998587727546692e-18",
|
||||
"0.000000000000000000000020211012210322333223212221|3.0481e-14|3.0481e-14|0.0000|3.048132658004761e-14|3.048132658004761e-14",
|
||||
"20788c2ac5.38337|4.2124995589256286621e+10|42124995589.256286621|42124995589.2562866210937500000|4.212499558925629e+10|42124995589.25629",
|
||||
"-0.00000000000000044b587a6c2d2c7|-1.994478702545e-18|-1.994478702545e-18|-0.000000000000|-1.9944787025451663e-18|-1.9944787025451663e-18",
|
||||
"-0.000b53c16cba505e|-1.075398921967e-4|-0.0001075398921967|-0.000107539892|-1.0753989219665528e-4|-0.00010753989219665528",
|
||||
"0.000000000000000514gdg500i18|3.53599786758422820e-21|3.53599786758422820e-21|0.00000000000000000|3.535997867584228e-21|3.535997867584228e-21",
|
||||
"64b4c4d6b5b2.0b|2.568888664e+13|2.568888664e+13|25688886642456.054687500|2.5688886642456055e+13|25688886642456.055",
|
||||
"-3.7558ca27b09939|-3.570637703e+0|-3.570637703|-3.570637703|-3.5706377029418945e+0|-3.5706377029418945",
|
||||
"0.07d2dc99999999c|3.0561244487762453e-2|0.030561244487762453|0.0305612444877625|3.0561244487762453e-2|0.030561244487762453",
|
||||
"0.0a632411bc12dea|4.62844729e-2|0.0462844729|0.04628447|4.62844729423523e-2|0.0462844729423523",
|
||||
"w.67dks9fta|3.2182872295379638672e+1|32.182872295379638672|32.1828722953796386719|3.218287229537964e+1|32.18287229537964",
|
||||
"0.000000000000d1bl7ij314cb|4.62154269218445e-17|4.62154269218445e-17|0.00000000000000|4.621542692184448e-17|4.621542692184448e-17",
|
||||
"-0.000240553531441440444535|-2.0788407325744631e-3|-0.0020788407325744631|-0.0020788407325745|-2.078840732574463e-3|-0.002078840732574463",
|
||||
"-0.0000000000000000000000010221225342540045433|-2.2495162487030030e-19|-2.2495162487030030e-19|-0.0000000000000000|-2.249516248703003e-19|-2.249516248703003e-19",
|
||||
"-0.00000000000000gq1kd8ohm99|-3.32129e-21|-3.32129e-21|-0.00000|-3.321287631988525e-21|-3.321287631988525e-21",
|
||||
"0.00000000vcp9spqk4v|3.9793491e-13|3.9793491e-13|0.0000000|3.979349136352539e-13|3.979349136352539e-13",
|
||||
"-0.00017338275145333387|-2.7742684e-4|-0.00027742684|-0.0002774|-2.774268388748169e-4|-0.0002774268388748169",
|
||||
"0.0foi4ma3l5id|2.1829664707184e-2|0.021829664707184|0.0218296647072|2.1829664707183838e-2|0.021829664707183838",
|
||||
"2b0enfjidi4k|1.985079e+16|1.985079e+16|19850790500640868.000000|1.9850790500640868e+16|19850790500640868",
|
||||
"0.0000000000000el4icc3jl3i8|2.40517e-18|2.40517e-18|0.00000|2.4051725864410404e-18|2.4051725864410404e-18",
|
||||
"-0.0000000000000nk4j85lcmie|-5.6951045990e-21|-5.6951045990e-21|-0.0000000000|-5.6951045989990235e-21|-5.6951045989990235e-21",
|
||||
"28g60579f2.90g4|2.99692511558533e+11|299692511558.533|299692511558.53271484375000|2.996925115585327e+11|299692511558.5327",
|
||||
"0.0000000000000ma6cvr1ecgp|8.083e-21|8.083e-21|0.000|8.08337926864624e-21|8.08337926864624e-21",
|
||||
"-0.00003b44da433c7862|-4.94e-6|-0.00000494|-0.00|-4.941651523113251e-6|-0.000004941651523113251",
|
||||
"-0.00dh706c7241ci|-1.294817626476288e-3|-0.001294817626476288|-0.001294817626476|-1.294817626476288e-3|-0.001294817626476288",
|
||||
"0.000000000000007tea55o28c5|3e-22|3e-22|0|3.3881545066833493e-22|3.3881545066833493e-22",
|
||||
"0.0000000000000000042add4973682038|9.836426e-21|9.836426e-21|0.000000|9.836426004767418e-21|9.836426004767418e-21",
|
||||
"-0.000000000000018cb956aba1c3ab8|-4.2965853214263918848e-16|-4.2965853214263918848e-16|-0.0000000000000004297|-4.296585321426392e-16|-4.296585321426392e-16",
|
||||
"4c4dfc4c5d2a.2|8.38978290557861250e+13|83897829055786.1250|83897829055786.12500000000000000|8.389782905578612e+13|83897829055786.12",
|
||||
"-61egfb039.c1577|-4.26268339e+10|-4.26268339e+10|-42626833915.71044922|-4.262683391571045e+10|-42626833915.71045",
|
||||
"-ewjauuh.iomc|-1.935581e+10|-1.935581e+10|-19355809688.568115|-1.9355809688568115e+10|-19355809688.568115",
|
||||
"0.0000000000f748hbm0090k|1.005417109e-14|1.005417109e-14|0.000000000|1.0054171085357666e-14|1.0054171085357666e-14",
|
||||
"0.0000000000000000007a78aca2738079|5.345488e-21|5.345488e-21|0.000000|5.345487594604492e-21|5.345487594604492e-21",
|
||||
"0.0000000000001716172502354663724|3.46119403839e-12|3.46119403839e-12|0.00000000000|3.461194038391113e-12|3.461194038391113e-12",
|
||||
"13cei7fada.e7|3.0298924446105957e+12|3029892444610.5957|3029892444610.5957031250000000|3.0298924446105957e+12|3029892444610.5957",
|
||||
"-21230102323333032.212001|-3.5161662101746e+11|-351616621017.46|-351616621017.4560546875000|-3.5161662101745605e+11|-351616621017.45605",
|
||||
"0.0000000000022f2653662h7|2.89498329e-16|2.89498329e-16|0.00000000|2.894983291625977e-16|2.894983291625977e-16",
|
||||
"5301.1457472521544|3.88916850090026855e+3|3889.16850090026855|3889.16850090026855469|3.8891685009002686e+3|3889.1685009002686",
|
||||
"-mfk8of5lc2i.6|-2.15841054916381825e+15|-2158410549163818.25|-2158410549163818.25000000000000000|-2.1584105491638182e+15|-2158410549163818.2",
|
||||
"0.00000000000004dd35pu8iwj|2.4257493019104001562e-21|2.4257493019104001562e-21|0.0000000000000000000|2.4257493019104e-21|2.4257493019104e-21",
|
||||
"0.000000000003435344344334232635|2.636e-10|2.636e-10|0.000|2.636139392852783e-10|2.636139392852783e-10",
|
||||
"-0.0000166tpucc7uu|-3.0360156e-8|-3.0360156e-8|-0.0000000|-3.036015629768371e-8|-3.036015629768371e-8",
|
||||
"0.00000000000659856612897672|2.082353830338e-12|2.082353830338e-12|0.000000000002|2.0823538303375244e-12|2.0823538303375244e-12",
|
||||
"0.0000da8e9009164cf|9.59172249e-6|0.00000959172249|0.00000959|9.591722488403321e-6|0.000009591722488403321",
|
||||
"-0.00000016rvuuiuxdvk|-2.28591442108154e-11|-2.28591442108154e-11|-0.00000000002286|-2.285914421081543e-11|-2.285914421081543e-11",
|
||||
"-0.0000000000010c2c0o7j2m4|-1.7102003097534180e-17|-1.7102003097534180e-17|-0.0000000000000000|-1.710200309753418e-17|-1.710200309753418e-17",
|
||||
"-111110100000111.101100011011101|-3.200769e+4|-32007.69|-32007.694244|-3.2007694244384766e+4|-32007.694244384766",
|
||||
"-entauf3apub|-2.2550821304321288e+16|-22550821304321288|-22550821304321288.0000000000000000|-2.255082130432129e+16|-22550821304321290",
|
||||
"-321a8.1bc88207|-3.271040916e+5|-327104.0916|-327104.091644287|-3.271040916442871e+5|-327104.0916442871",
|
||||
"6wtpcj74392w|5e+17|5e+17|488999247550964352|4.8899924755096435e+17|488999247550964350",
|
||||
"0.000000000002ibgcg7l6c41|4.594702981412411e-17|4.594702981412411e-17|0.000000000000000|4.5947029814124105e-17|4.5947029814124105e-17",
|
||||
"9d9b3.5428758a|3.83337e+5|383337|383337.37850|3.833373785018921e+5|383337.3785018921",
|
||||
"2gj9.1e2gn601|4.64710593223572e+4|46471.0593223572|46471.05932235717773|4.647105932235718e+4|46471.05932235718",
|
||||
"-0.0000093j0gjefh4ni|-2.9598772525787353434e-8|-2.9598772525787353434e-8|-0.0000000295987725258|-2.9598772525787353e-8|-2.9598772525787353e-8",
|
||||
"0.000015351d68c692f7|1.26406431198120119e-6|0.00000126406431198120119|0.00000126406431198|1.2640643119812012e-6|0.0000012640643119812012",
|
||||
"64aigh8.ga0be8|3.986e+8|3.986e+8|398550748.825|3.9855074882507324e+8|398550748.82507324",
|
||||
"8489.fh4988a56|4.810588658e+4|48105.88658|48105.886578560|4.8105886578559875e+4|48105.886578559875",
|
||||
"-a46k.pcb5bcq|-3.639447689056396484e+5|-363944.7689056396484|-363944.768905639648437500|-3.6394476890563965e+5|-363944.76890563965",
|
||||
"-1moaje1e.g51i|-2.5e+10|-2.5e+10|-24514138698.6|-2.451413869857788e+10|-24514138698.57788",
|
||||
"-9k.6lgc2d1g45|-2.27301925e+2|-227.301925|-227.30192542|-2.273019254207611e+2|-227.3019254207611",
|
||||
"-0.6gedc2f4eea18c|-4.1131830e-1|-0.41131830|-0.4113183|-4.11318302154541e-1|-0.411318302154541",
|
||||
"-2.ul0xutl5q1|-2.9e+0|-2.9|-2.9|-2.9005444049835205e+0|-2.9005444049835205",
|
||||
"223034014043102443.01432|1.927264034748e+12|1927264034748|1927264034748.077392578125|1.9272640347480774e+12|1927264034748.0774",
|
||||
"79srle6.89p6a|4.368844e+9|4.368844e+9|4368844032.287598|4.368844032287598e+9|4368844032.287598",
|
||||
"-0.00000bba8c661432306|-1.57247066e-6|-0.00000157247066|-0.00000157|-1.5724706649780275e-6|-0.0000015724706649780275",
|
||||
"0.00000000002d63vqevlxv|3.4017e-17|3.4017e-17|0.0000|3.401741981506348e-17|3.401741981506348e-17",
|
||||
"4aee2k7.fg89cd|3.867591917514801e+8|386759191.7514801|386759191.751480102539063|3.867591917514801e+8|386759191.7514801",
|
||||
"12kpc8l33710|3.9012194e+16|3.9012194e+16|39012193679809568.0000000|3.901219367980957e+16|39012193679809570",
|
||||
"-0.00000000000000000000000000000300022202231002110311113102|-2.61e-18|-2.61e-18|-0.00|-2.6110148429870608e-18|-2.6110148429870608e-18",
|
||||
"0.0000003196b9g9872o|2.9154932e-10|2.9154932e-10|0.0000000|2.9154932498931886e-10|2.9154932498931886e-10",
|
||||
"0.0000001i42a6epkb3m|1.59867882729e-10|1.59867882729e-10|0.00000000016|1.5986788272857667e-10|1.5986788272857667e-10",
|
||||
"0.00000000143ncg6l15aa|4.442325830e-13|4.442325830e-13|0.000000000|4.4423258304595945e-13|4.4423258304595945e-13",
|
||||
"-0.00000000000039b5xxbt9xp|-2.76163578033447e-20|-2.76163578033447e-20|-0.00000000000000|-2.7616357803344726e-20|-2.7616357803344726e-20",
|
||||
"0.001226r6o4udg4|2.9569315910339356e-5|0.000029569315910339356|0.0000295693159103|2.9569315910339356e-5|0.000029569315910339356",
|
||||
"5hd56ij.95hf98|3.76522779464721680e+8|376522779.464721680|376522779.46472167968750000|3.765227794647217e+8|376522779.4647217",
|
||||
"1dr56ta.2dgb|2e+9|2e+9|1832435131|1.832435131072998e+9|1832435131.072998",
|
||||
"-0.01f3050e4b00di|-5e-3|-0.005|-0|-4.9801180139184e-3|-0.0049801180139184",
|
||||
"0.0000000000000000013342013012234331101404|4.601421952247619e-13|4.601421952247619e-13|0.000000000000460|4.601421952247619e-13|4.601421952247619e-13",
|
||||
"-243221404221230203.32342|-2.2428798676e+12|-2.2428798676e+12|-2242879867553.7109375000|-2.242879867553711e+12|-2242879867553.711",
|
||||
"-0.00000000000021cb5b2b6cd7307|-1.09103798866272e-15|-1.09103798866272e-15|-0.00000000000000|-1.0910379886627197e-15|-1.0910379886627197e-15",
|
||||
"-0.0000000001c87dee333d7bc|-4.74081e-13|-4.74081e-13|-0.00000|-4.740808010101318e-13|-4.740808010101318e-13",
|
||||
"5cf.88ebga379|2.472e+3|2472|2472.401|2.472400665283203e+3|2472.400665283203",
|
||||
"-b4.6275dh29h7|-2.462775409e+2|-246.2775409|-246.277540922|-2.4627754092216492e+2|-246.27754092216492",
|
||||
"-0.00000000011887129a93a3224|-1.84739947319e-11|-1.84739947319e-11|-0.00000000002|-1.8473994731903078e-11|-1.8473994731903078e-11",
|
||||
"0.0000000000256kfck6l3035|3.836289644241332675e-15|3.836289644241332675e-15|0.000000000000003836|3.836289644241333e-15|3.836289644241333e-15",
|
||||
"3.3024032334124424332423|3.6226272583e+0|3.6226272583|3.6226272583|3.6226272583007812e+0|3.6226272583007812",
|
||||
"-100203001100212322022322102|-4.65762e+15|-4.65762e+15|-4657617807388306.00000|-4.657617807388306e+15|-4657617807388306",
|
||||
"-1100100011001000100010010101111011101110100011110.0001|-4.415272e+14|-4.415272e+14|-441527247428894.062500|-4.4152724742889406e+14|-441527247428894.06",
|
||||
"0.000000000000012aik1ek76d3h|1.789422035217285e-19|1.789422035217285e-19|0.000000000000000|1.7894220352172852e-19|1.7894220352172852e-19",
|
||||
"-2pg7j.75pgtdj|-3.29e+6|-3.29e+6|-3287941.22|-3.2879412174224854e+6|-3287941.2174224854",
|
||||
"-100000.1101110101100010001011|-3.28647792339e+1|-32.8647792339|-32.86477923393|-3.2864779233932495e+1|-32.864779233932495",
|
||||
"7efoo90m.7b18|7.89e+10|7.89e+10|78874826431.27|7.887482643127441e+10|78874826431.27441",
|
||||
"-0.0000191bid3h79b6|-4.512e-8|-4.512e-8|-0.000|-4.512017667293548e-8|-4.512017667293548e-8",
|
||||
"h5d65.lkk772|6.7270308732986e+6|6727030.8732986|6727030.8732986450195|6.727030873298645e+6|6727030.873298645",
|
||||
"13hb4bj1h99c.98|2e+14|2e+14|244511485099792|2.4451148509979247e+14|244511485099792.47",
|
||||
"0.0000000000000000000000000000000000000000000000000000000001000000000011100000001110101110100010010111010001001|3.47e-18|3.47e-18|0.00|3.472414612770081e-18|3.472414612770081e-18",
|
||||
"-0.0000000005hngj044fdc|-3e-14|-3e-14|-0|-2.7500107884407043e-14|-2.7500107884407043e-14",
|
||||
"-0.000000000000000000000000000000203333322232132001333301212|-4.87873527687e-19|-4.87873527687e-19|-0.00000000000|-4.87873527687043e-19|-4.87873527687043e-19",
|
||||
"-2d061n.h4utt8|-6.926989555e+7|-69269895.55|-69269895.553588867|-6.926989555358887e+7|-69269895.55358887",
|
||||
"0.0000000000000000000133303310333022101331120323|1.80817842483521e-12|1.80817842483521e-12|0.00000000000181|1.808178424835205e-12|1.808178424835205e-12",
|
||||
"-0.00000000000040001042131120024100321|-3.278344869613648e-9|-3.278344869613648e-9|-0.000000003278345|-3.2783448696136476e-9|-3.2783448696136476e-9",
|
||||
"0.0000000000000000023120212200000303321232211|4e-11|4e-11|0|4.1416203975677494e-11|4.1416203975677494e-11",
|
||||
"-32d3ddh8a6ga.a|-2.026e+14|-2.026e+14|-202566329389810.563|-2.0256632938981056e+14|-202566329389810.56",
|
||||
"-7tn.psaj011t|-7.64983594e+3|-7649.83594|-7649.83594418|-7.64983594417572e+3|-7649.83594417572",
|
||||
"0.0000ia8fjjeifh9i|4.52879e-6|0.00000452879|0.00000|4.5287942886352546e-6|0.0000045287942886352546",
|
||||
"-0.00214g5d54701b0d|-4e-4|-0.0004|-0|-3.550581932067871e-4|-0.0003550581932067871",
|
||||
"170029550790786.75|1.70029550791e+14|1.70029550791e+14|170029550790786.75000000000|1.7002955079078675e+14|170029550790786.75",
|
||||
"0.000012334a2a845b2a64|4.78021383285523e-6|0.00000478021383285523|0.00000478021383|4.780213832855225e-6|0.000004780213832855225",
|
||||
"-148.a15a7836b33a|-2.9367280006409e+2|-293.67280006409|-293.6728000640869|-2.936728000640869e+2|-293.6728000640869",
|
||||
"-a85d.t4e0l5k|-3.0577e+5|-3.0577e+5|-305766.9401|-3.057669401168823e+5|-305766.9401168823",
|
||||
"-0.0000000000000003h27be89agehf|-3.254237e-20|-3.254237e-20|-0.000000|-3.254236876964569e-20|-3.254236876964569e-20",
|
||||
"s5ifnto.w4h|4.350637e+10|4.350637e+10|43506371974.945068|4.350637197494507e+10|43506371974.94507",
|
||||
"-0.00000000003khhp0eeb5q|-3.0413496494293214272e-16|-3.0413496494293214272e-16|-0.0000000000000003041|-3.0413496494293214e-16|-3.0413496494293214e-16",
|
||||
"34038.11454772949|3.4038114547729e+4|34038.114547729|34038.1145477294922|3.403811454772949e+4|34038.11454772949",
|
||||
"-442ipo.c8194|-5e+7|-5e+7|-49401402|-4.940140247344971e+7|-49401402.47344971",
|
||||
"1f0lkb447.69l6|9.24042724e+10|9.24042724e+10|92404272407.29331970|9.240427240729332e+10|92404272407.29332",
|
||||
"0.00000000225b7135192264b7|4.279e-10|4.279e-10|0.000|4.2794406414031986e-10|4.2794406414031986e-10",
|
||||
"-33115302125211.5000044|-4.619122445583344e+10|-46191224455.83344|-46191224455.833435058593750|-4.6191224455833435e+10|-46191224455.833435",
|
||||
"1g0dcm3ia8ma.h|1.6166961e+15|1.6166961e+15|1616696119308471.7500000|1.6166961193084718e+15|1616696119308471.8",
|
||||
"-0.000000000000000000671315341624332102|-4.786e-17|-4.786e-17|-0.000|-4.785681962966919e-17|-4.785681962966919e-17",
|
||||
"-3.d58678|-3.834083e+0|-3.834083|-3.834083|-3.834083080291748e+0|-3.834083080291748",
|
||||
"0.0000001d54bn182hnk|2.50394463539e-10|2.50394463539e-10|0.00000000025|2.5039446353912354e-10|2.5039446353912354e-10",
|
||||
"-0.00000000000000001667076335663311|-3.1662023067e-18|-3.1662023067e-18|-0.0000000000|-3.1662023067474367e-18|-3.1662023067474367e-18",
|
||||
"-424443721771240.25|-4.24443721771240250e+14|-424443721771240.250|-424443721771240.25000000000000000|-4.2444372177124025e+14|-424443721771240.25",
|
||||
"-0.0000000000002m03pif9fcv|-4.8451209068298e-20|-4.8451209068298e-20|-0.0000000000000|-4.845120906829834e-20|-4.845120906829834e-20",
|
||||
"-0.0000000megd0oiffnh|-7.940673828125000e-12|-7.940673828125000e-12|-0.000000000007941|-7.940673828125e-12|-7.940673828125e-12",
|
||||
"1edcd1l8403iak|4.707107543945312640e+17|470710754394531264.0|470710754394531264.000000000000000000|4.7071075439453126e+17|470710754394531260",
|
||||
"1bmqhlr7.84fc|2.4e+10|2.4e+10|24263000488.3|2.426300048828125e+10|24263000488.28125",
|
||||
"0.000000000g68e832c92d3|3.9e-13|3.9e-13|0.0|3.9291679859161376e-13|3.9291679859161376e-13",
|
||||
"0.0000004itydk2djyi|7.05e-11|7.05e-11|0.00|7.054415345191956e-11|7.054415345191956e-11",
|
||||
"pp.842lid5h6|6.753137707710266113e+2|675.3137707710266113|675.313770771026611328|6.753137707710266e+2|675.3137707710266",
|
||||
"0.000000275bf5hb33ac29|3.9305365e-9|3.9305365e-9|0.0000000|3.93053650856018e-9|3.93053650856018e-9",
|
||||
"3e.2wvidcegt|1.1908400058746338e+2|119.08400058746338|119.0840005874633789|1.1908400058746338e+2|119.08400058746338",
|
||||
"-0.00000000000126b89a2c962a1|-8.966958522797e-15|-8.966958522797e-15|-0.000000000000|-8.96695852279663e-15|-8.96695852279663e-15",
|
||||
"-12657688433.5771736|-4.5479536056518554688e+9|-4547953605.6518554688|-4547953605.6518554687500000000|-4.547953605651855e+9|-4547953605.651855",
|
||||
"23022012.331110122|4.5702958106994629e+4|45702.958106994629|45702.9581069946289063|4.570295810699463e+4|45702.95810699463",
|
||||
"0.000000000000073ffe15|4.388099908829e-18|4.388099908829e-18|0.000000000000|4.388099908828736e-18|4.388099908828736e-18",
|
||||
"0.000002e761e9a0e7b6d|8.2335948944e-8|8.2335948944e-8|0.0000000823|8.233594894409179e-8|8.233594894409179e-8",
|
||||
"-0.0000000000000000000042262211517020033|-3.8891649246215816560e-20|-3.8891649246215816560e-20|-0.0000000000000000000|-3.8891649246215817e-20|-3.8891649246215817e-20",
|
||||
"-3h5a.28j32bj15|-3.0910122394562e+4|-30910.122394562|-30910.1223945617676|-3.0910122394561768e+4|-30910.122394561768",
|
||||
"0.08k0a8l41cjqg|1.1990761756897e-2|0.011990761756897|0.0119907617569|1.1990761756896973e-2|0.011990761756896973",
|
||||
"-2k5a.jc2kff5c|-4.38857794e+4|-43885.7794|-43885.77938080|-4.388577938079834e+4|-43885.77938079834",
|
||||
"-e84ddij4feh.f|-9.09284353e+14|-9.09284353e+14|-909284353256225.62500000|-9.092843532562256e+14|-909284353256225.6",
|
||||
"0.00000000000000000002012443141821533|1.6580260e-19|1.6580260e-19|0.0000000|1.6580259799957278e-19|1.6580259799957278e-19",
|
||||
"0.000000001101010010100111111000111101011100001010001111010111|3.244870305061e-3|0.003244870305061|0.003244870305|3.2448703050613403e-3|0.0032448703050613403",
|
||||
"-1g.4qf3pe2od|-4.9145507812500000e+1|-49.145507812500000|-49.1455078125000000|-4.91455078125e+1|-49.1455078125",
|
||||
"-0.000000000002855364075263a6|-1.13630294799804679e-13|-1.13630294799804679e-13|-0.00000000000011363|-1.1363029479980468e-13|-1.1363029479980468e-13",
|
||||
"1.dj2aa20aaif|1.69781566e+0|1.69781566|1.69781566|1.6978156566619873e+0|1.6978156566619873",
|
||||
"chf60d3.bkg52|1.45174860954e+9|1451748609.54|1451748609.54284667969|1.4517486095428467e+9|1451748609.5428467",
|
||||
"-0.000000000000tg1722hx42|-3.6322713e-19|-3.6322713e-19|-0.0000000|-3.63227128982544e-19|-3.63227128982544e-19",
|
||||
"-3jk90id46e3gf|-2.9064e+16|-2.9064e+16|-29063534736633300.0000|-2.90635347366333e+16|-29063534736633300",
|
||||
"-6k626ha0.g5a6|-1.25468105078e+10|-12546810507.8|-12546810507.77435302734|-1.2546810507774353e+10|-12546810507.774353",
|
||||
"-0.549ppjdjdoc|-1.714763641357e-1|-0.1714763641357|-0.171476364136|-1.714763641357422e-1|-0.1714763641357422",
|
||||
"0.00319ac5886gbc|2.878513336181641e-4|0.0002878513336181641|0.000287851333618|2.8785133361816407e-4|0.00028785133361816407",
|
||||
"-0.00000000000001214103102444102110401|-2.4146843e-10|-2.4146843e-10|-0.0000000|-2.414684295654297e-10|-2.414684295654297e-10",
|
||||
"0.355877256108772875|4e-1|0.4|0|4.0327203273773193e-1|0.40327203273773193",
|
||||
"0.0000000000000001212010202122012000100022011202102|4.3139534862712022e-8|4.3139534862712022e-8|0.0000000431395349|4.313953486271202e-8|4.313953486271202e-8",
|
||||
"37r18mgb.okg|1.37953758e+11|1.37953758e+11|137953758239.74609375|1.379537582397461e+11|137953758239.7461",
|
||||
"-3.rvbtbiaep2|-3.84697914124e+0|-3.84697914124|-3.84697914124|-3.8469791412353516e+0|-3.8469791412353516",
|
||||
"0.0000053327456221642471|2.07047820091247567e-5|0.0000207047820091247567|0.00002070478200912|2.0704782009124757e-5|0.000020704782009124757",
|
||||
"-791.jhkfne2hk|-4.6018e+3|-4601.8|-4601.7885|-4.601788520812988e+3|-4601.788520812988",
|
||||
"-3.920376300811768e-18|-3.9203763008117681e-18|-3.9203763008117681e-18|-0.0000000000000000|-3.920376300811768e-18|-3.920376300811768e-18",
|
||||
"-1112201111202011001011210111.022101|-1.178368330001831055e+13|-11783683300018.31055|-11783683300018.310546875000000000|-1.178368330001831e+13|-11783683300018.31",
|
||||
"-0.0000000000000000000010101000001010111001010011011001010000000111100010011|-6.2648296356e-7|-6.2648296356e-7|-0.0000006265|-6.264829635620117e-7|-6.264829635620117e-7",
|
||||
"-0.0000000000123323122212012131222130212|-4.16e-7|-4.16e-7|-0.00|-4.1616511344909666e-7|-4.1616511344909666e-7",
|
||||
"gcmgcp3hc8cb|9.15881e+16|9.15881e+16|91588079929351808.00000|9.15880799293518e+16|91588079929351800",
|
||||
"0.000000000000059fa819e57eab|1.68429136276245137e-18|1.68429136276245137e-18|0.00000000000000000|1.6842913627624514e-18|1.6842913627624514e-18",
|
||||
"-3cmeji07.476i|-2.1e+10|-2.1e+10|-21460855007.2|-2.146085500717163e+10|-21460855007.17163",
|
||||
"-2.4649947881698608e-14|-2.4650e-14|-2.4650e-14|-0.0000|-2.4649947881698608e-14|-2.4649947881698608e-14",
|
||||
"-178.denropdgm|-1.40240e+3|-1402.40|-1402.39507|-1.4023950695991516e+3|-1402.3950695991516",
|
||||
"ukusbsls0pb|4.69190001e+16|4.69190001e+16|46919000148773192.00000000|4.691900014877319e+16|46919000148773190",
|
||||
"-8c22211.6b5ae3|-2.1031630039e+8|-210316300.39|-210316300.3921508789|-2.1031630039215088e+8|-210316300.39215088",
|
||||
"0.asq1me64akeh|3.7918985e-1|0.37918985|0.3791898|3.791898488998413e-1|0.3791898488998413",
|
||||
"-0.0000000000000581e7d2ed7g367|-3.25279831886292e-17|-3.25279831886292e-17|-0.00000000000000|-3.252798318862915e-17|-3.252798318862915e-17",
|
||||
"-jlofp.72e|-2e+7|-2e+7|-20636153|-2.063615322113037e+7|-20636153.22113037",
|
||||
"0.00rfse7ijo6m7|1.01969033479690544e-3|0.00101969033479690544|0.00101969033479691|1.0196903347969054e-3|0.0010196903347969054",
|
||||
"0.0000000000000009ca92f6854305|5.308e-19|5.308e-19|0.000|5.307877063751221e-19|5.307877063751221e-19",
|
||||
"-4k2.ptcx8n7k|-5.60273826122e+3|-5602.73826122|-5602.73826122284|-5.602738261222839e+3|-5602.738261222839",
|
||||
"-0.0000000e809b9bdccae5|-1.3109028e-9|-1.3109028e-9|-0.0000000|-1.3109028339385987e-9|-1.3109028339385987e-9",
|
||||
"ab49a37a6.d43|4.59796786e+10|4.59796786e+10|45979678630.82885742|4.597967863082886e+10|45979678630.82886",
|
||||
"-0.00005312622306120100332|-3.24712872505188003e-4|-0.000324712872505188003|-0.00032471287250519|-3.24712872505188e-4|-0.000324712872505188",
|
||||
"0.0000000000000dh2j51gb52gc|4.25908684730529841e-18|4.25908684730529841e-18|0.00000000000000000|4.2590868473052984e-18|4.2590868473052984e-18",
|
||||
"0.000000hnng2o4c52a|4.1574811935424805e-10|4.1574811935424805e-10|0.0000000004157481|4.1574811935424805e-10|4.1574811935424805e-10",
|
||||
"0.0000000000041204012124212030011|1.75575e-8|1.75575e-8|0.00000|1.7557477951049804e-8|1.7557477951049804e-8",
|
||||
"0.000000000000000000110122330131313100100223102|4.6432006359e-12|4.6432006359e-12|0.0000000000|4.643200635910034e-12|4.643200635910034e-12",
|
||||
"-0.000004k6kufidb32|-3.5712480545e-9|-3.5712480545e-9|-0.0000000036|-3.5712480545043945e-9|-3.5712480545043945e-9",
|
||||
"0.0000000000000111210011012200110010022112121111|3.2019984722e-7|3.2019984722e-7|0.0000003202|3.201998472213745e-7|3.201998472213745e-7",
|
||||
"-2jkodqft4rd2|-2.47141957283020e+17|-2.47141957283020e+17|-247141957283020032.00000000000000|-2.4714195728302003e+17|-247141957283020030",
|
||||
"0.000000000000000000000000000000000000001121122200021221220201100021022002|4.0e-19|4.0e-19|0.0|3.989684581756592e-19|3.989684581756592e-19",
|
||||
"-0.0000000000000306b7e6e38289e|-4.199756681919098e-17|-4.199756681919098e-17|-0.000000000000000|-4.199756681919098e-17|-4.199756681919098e-17",
|
||||
"-1011010111100011010.01111111110100011|-3.725064992905e+5|-372506.4992905|-372506.499290466309|-3.725064992904663e+5|-372506.4992904663",
|
||||
"57d70e4l8.bbbc|4e+11|4e+11|417358398438|4.173583984375e+11|417358398437.5",
|
||||
"-0.0013fdffue4l4|-2.5615689530969e-5|-0.000025615689530969|-0.0000256156895|-2.5615689530968667e-5|-0.000025615689530968667",
|
||||
"0.0000000028c635799ab7467|3e-10|3e-10|0|2.5359439849853516e-10|2.5359439849853516e-10",
|
||||
"33.83290718b53|3.968909382820129395e+1|39.68909382820129395|39.689093828201293945|3.9689093828201294e+1|39.689093828201294",
|
||||
"-0.00000000a61d0f461g5be|-3.198281527e-11|-3.198281527e-11|-0.000000000|-3.198281526565552e-11|-3.198281526565552e-11",
|
||||
"0.000000000000000000013154160226005535362|1.83643579483e-17|1.83643579483e-17|0.00000000000|1.8364357948303224e-17|1.8364357948303224e-17",
|
||||
"20011330.3003333|3.314876556396484375e+4|33148.76556396484375|33148.765563964843750000|3.3148765563964844e+4|33148.765563964844",
|
||||
"0.000000dj840l39c3f3|3e-9|3e-9|0|3.0101239681243895e-9|3.0101239681243895e-9",
|
||||
"0.000000005d5ll8eo3ej|2e-13|2e-13|0|1.5381243545562029e-13|1.5381243545562029e-13",
|
||||
"29110202155246aa2|1.29909541e+17|1.29909541e+17|129909541457891472.00000000|1.2990954145789147e+17|129909541457891470",
|
||||
"0.0000000000008rv3thjdkhg|1.08716e-19|1.08716e-19|0.00000|1.0871601104736328e-19|1.0871601104736328e-19",
|
||||
"85d0.qbk149t|2.208908796310424805e+5|220890.8796310424805|220890.879631042480468750|2.2089087963104248e+5|220890.87963104248",
|
||||
"-0.0004344a1g63e688|-3.19951176643372e-5|-0.0000319951176643372|-0.00003199511766|-3.199511766433716e-5|-0.00003199511766433716",
|
||||
"-d1414e7.fdkkj|-1.932036876678467e+9|-1932036876.678467|-1932036876.678466796875000|-1.9320368766784668e+9|-1932036876.6784668",
|
||||
"-0.000000000006bg59gfb833ce|-1e-14|-1e-14|-0|-1.1505842208862305e-14|-1.1505842208862305e-14",
|
||||
"1defhajj9fbo|3.67976e+15|3.67976e+15|3679763376712799.00000|3.679763376712799e+15|3679763376712799",
|
||||
"0.0000000000000000737474314303111054|3.32801818848e-15|3.32801818848e-15|0.00000000000|3.3280181884765624e-15|3.3280181884765624e-15",
|
||||
"4idashe.5prji|4.0776706e+9|4.0776706e+9|4077670574.1882324|4.0776705741882324e+9|4077670574.1882324",
|
||||
"0.0000000000000000000000000000122012020011002110112111100012221|2.8e-14|2.8e-14|0.0|2.7836108207702638e-14|2.7836108207702638e-14",
|
||||
"-3231054321202.203301|-4.6370938420e+10|-46370938420|-46370938420.2957153320|-4.6370938420295715e+10|-46370938420.295715",
|
||||
"-0.00000000000000000000000000000000000000000010012210001222211110210202110011111|-3.26379776000977e-21|-3.26379776000977e-21|-0.00000000000000|-3.2637977600097655e-21|-3.2637977600097655e-21",
|
||||
"0.00000000fclv6r35utp|3.314651250839234e-13|3.314651250839234e-13|0.000000000000331|3.3146512508392335e-13|3.3146512508392335e-13",
|
||||
"-3206601110224.452431|-5e+10|-5e+10|-45755362511|-4.575536251068115e+10|-45755362510.68115",
|
||||
"0.000000000000000gm5814nkc6a6|1.3969236e-21|1.3969236e-21|0.0000000|1.3969236239790915e-21|1.3969236239790915e-21",
|
||||
"-21221211020202210212202202220011220|-4.423037767e+16|-4.423037767e+16|-44230377674102784.000000000|-4.423037767410278e+16|-44230377674102780",
|
||||
"-0.0000000000002ihjq1ap4sp|-3.13615202903747547e-20|-3.13615202903747547e-20|-0.00000000000000000|-3.1361520290374755e-20|-3.1361520290374755e-20",
|
||||
"1.c3c3b8|1.76470518e+0|1.76470518|1.76470518|1.7647051811218262e+0|1.7647051811218262",
|
||||
"-110.10101101001101011101|-6.677e+0|-6.677|-6.677|-6.676602363586426e+0|-6.676602363586426",
|
||||
"-0.00000000015314200443510333002|-3.1830e-8|-3.1830e-8|-0.0000|-3.18300724029541e-8|-3.18300724029541e-8",
|
||||
"-0.005665644|-1.143577695e-2|-0.01143577695|-0.011435777|-1.1435776948928833e-2|-0.011435776948928833",
|
||||
"0.00000000003abm0l5bl1gg|1e-16|1e-16|0|1.312462091445923e-16|1.312462091445923e-16",
|
||||
"3400798141956329500|3.4007981419563295e+18|3.4007981419563295e+18|3400798141956329472.0000000000000000|3.4007981419563295e+18|3400798141956329500",
|
||||
"-13142515505554.3345542|-2e+10|-2e+10|-20224809647|-2.0224809646606445e+10|-20224809646.606445",
|
||||
"3c7e1a82g9c86|2.63987481594085680e+16|26398748159408568.0|26398748159408568.00000000000000000|2.639874815940857e+16|26398748159408570",
|
||||
"0.000127436274324773717|3.340e-4|0.0003340|0.000|3.340122699737549e-4|0.0003340122699737549",
|
||||
"5if2nkiq6j.bm|4.3e+13|4.3e+13|43369740247726.4|4.336974024772644e+13|43369740247726.44",
|
||||
"0.00000864104746398591|4.8427870869636537008e-6|0.0000048427870869636537008|0.0000048427870869637|4.842787086963654e-6|0.000004842787086963654",
|
||||
"7qoh6z.f5stt|4.68075275421143e+8|468075275.421143|468075275.42114257812500|4.680752754211426e+8|468075275.4211426",
|
||||
"0.000000087633873564baa8|2.006344795227050697e-8|2.006344795227050697e-8|0.000000020063447952|2.0063447952270507e-8|2.0063447952270507e-8",
|
||||
"-3.544611456034443223|-3.810153008e+0|-3.810153008|-3.810153008|-3.810153007507324e+0|-3.810153007507324",
|
||||
"-0.00000007l289ik91jcn|-5.14e-11|-5.14e-11|-0.00|-5.140471458435059e-11|-5.140471458435059e-11",
|
||||
"0.0000023l4bg9k695j|1.92289621e-8|1.92289621e-8|0.00000002|1.9228962063789367e-8|1.9228962063789367e-8",
|
||||
"-9f96.27f0c|-4.08541560173e+4|-40854.1560173|-40854.15601730347|-4.085415601730347e+4|-40854.15601730347",
|
||||
"-0.00000000000000c39bbfdb15a0b|-1.06040e-17|-1.06040e-17|-0.00000|-1.0603952407836914e-17|-1.0603952407836914e-17",
|
||||
"6761345147651116360|1.256e+17|1.256e+17|125588774681091312.000|1.2558877468109131e+17|125588774681091310",
|
||||
"0.0mdpyquce4s|1.7269403e-2|0.017269403|0.0172694|1.7269402742385864e-2|0.017269402742385864",
|
||||
"-313102212231323311310.3203|-3.800e+12|-3.800e+12|-3799548149108.887|-3.7995481491088867e+12|-3799548149108.8867",
|
||||
"0.00000000000c8790f1aa208b8|4.45139229297637930e-14|4.45139229297637930e-14|0.00000000000004451|4.451392292976379e-14|4.451392292976379e-14",
|
||||
"0.0000000000003la5sa0a4fta|2.3e-19|2.3e-19|0.0|2.327841520309448e-19|2.327841520309448e-19",
|
||||
"-5ja.6k00gfbh|-3.8842604e+3|-3884.2604|-3884.2603564|-3.884260356426239e+3|-3884.260356426239",
|
||||
"-0.000000000pc2t0luuezi|-6.930e-15|-6.930e-15|-0.000|-6.929540634155274e-15|-6.929540634155274e-15",
|
||||
"2rafm.9m5k|2.9926303e+6|2992630.3|2992630.3029060|2.9926303029060364e+6|2992630.3029060364",
|
||||
"-0.000000000000000b9njo62ilq1e|-1.4249e-22|-1.4249e-22|-0.0000|-1.4248967170715331e-22|-1.4248967170715331e-22",
|
||||
"0.00000000000001lb7b6cp3acg|2.8280702233315e-20|2.8280702233315e-20|0.0000000000000|2.8280702233314516e-20|2.8280702233314516e-20",
|
||||
"0.00006c0aaa2d0102e|3.52910399437e-6|0.00000352910399437|0.00000352910|3.5291039943695072e-6|0.0000035291039943695072",
|
||||
"28mhoiamidd.n|3.30508589744568e+14|330508589744568|330508589744567.87500000000000|3.305085897445679e+14|330508589744567.9",
|
||||
"-0.08gnak2d9alej|-1e-2|-0.01|-0|-1.2795889377593996e-2|-0.012795889377593996",
|
||||
"-5r1j3.1lac5po|-3.667303062975e+6|-3667303.062975|-3667303.062975406647|-3.6673030629754066e+6|-3667303.0629754066",
|
||||
"16eae.7246ch006|1.767333746e+5|176733.3746|176733.374595642|1.767333745956421e+5|176733.3745956421",
|
||||
"-3l52ss7c7sd.7|-1.569324731826782e+15|-1569324731826782|-1569324731826782.250000000000000|-1.5693247318267822e+15|-1569324731826782.2",
|
||||
"0.0000004mc5oo5b6da|2.76705145835877e-10|2.76705145835877e-10|0.00000000027671|2.767051458358765e-10|2.767051458358765e-10",
|
||||
"0.00032481420040130616|3.2481e-4|0.00032481|0.0003|3.2481420040130616e-4|0.00032481420040130616",
|
||||
"0.0000000042thw2cl3fj|4.01567280293e-14|4.01567280293e-14|0.00000000000|4.01567280292511e-14|4.01567280292511e-14",
|
||||
"0.00000000000000159d0mb0bij14|2.4262332916259765e-21|2.4262332916259765e-21|0.0000000000000000|2.4262332916259765e-21|2.4262332916259765e-21",
|
||||
"-2332102201211303221303.032|-1.30766e+13|-1.30766e+13|-13076591491699.21875|-1.3076591491699219e+13|-13076591491699.219",
|
||||
"43215327.a929129|4.453710317611694e+8|445371031.7611694|445371031.761169433593750|4.4537103176116943e+8|445371031.76116943",
|
||||
"-0.0000000000000000000000000000000000000001111011101110011110000101101100111111111100111000101|-1.758254e-12|-1.758254e-12|-0.000000|-1.758253574371338e-12|-1.758253574371338e-12",
|
||||
"-0.0005a74479344312418|-4.07777e-4|-0.000407777|-0.00041|-4.0777742862701415e-4|-0.00040777742862701415",
|
||||
"a0ia1ae2.lqg|2.191455364227295e+11|219145536422.7295|219145536422.729492187500000|2.191455364227295e+11|219145536422.7295",
|
||||
"-0.e2uy3a3jtt9|-3.910954e-1|-0.3910954|-0.391095|-3.910953998565674e-1|-0.3910953998565674",
|
||||
"-0.00000000000001c177i9ahbb27|-3.978395462036e-20|-3.978395462036e-20|-0.000000000000|-3.978395462036133e-20|-3.978395462036133e-20",
|
||||
"0.00002f2na1gdk86i|1.030076742172241142e-7|1.030076742172241142e-7|0.000000103007674217|1.0300767421722411e-7|1.0300767421722411e-7",
|
||||
"29ffgcoin.5g6|4.94759917259216e+11|494759917259.216|494759917259.21630859375000|4.947599172592163e+11|494759917259.2163",
|
||||
"0.0000ed00f54gb9517|3.57952118e-6|0.00000357952118|0.00000358|3.579521179199219e-6|0.000003579521179199219",
|
||||
"0.000000009j8b360bda1k|1.2494468688965e-11|1.2494468688965e-11|0.0000000000125|1.2494468688964845e-11|1.2494468688964845e-11",
|
||||
"0.00001845411495998992|6.82201385498046916e-6|0.00000682201385498046916|0.00000682201385498|6.822013854980469e-6|0.000006822013854980469",
|
||||
"-8h2seda00f.2|-1.246128082275391e+14|-124612808227539.1|-124612808227539.062500000000000|-1.2461280822753906e+14|-124612808227539.06",
|
||||
"0.000000000000000000000000010110110100000001100010110001101001111010110101011|2e-8|2e-8|0|2.1246147155761717e-8|2.1246147155761717e-8",
|
||||
"-0.0000000017b1bb1587326277|-3.2188891619444e-10|-3.2188891619444e-10|-0.0000000003219|-3.2188891619443897e-10|-3.2188891619443897e-10",
|
||||
"-0.00000000000pdigmaihem8|-1.699396371841e-16|-1.699396371841e-16|-0.000000000000|-1.6993963718414307e-16|-1.6993963718414307e-16",
|
||||
"-0.000000000026631cd8b7d853|-2.806544303894043038e-13|-2.806544303894043038e-13|-0.000000000000280654|-2.806544303894043e-13|-2.806544303894043e-13",
|
||||
"-5ef.954dcb38f|-2.295463e+3|-2295.463|-2295.463085|-2.2954630851745605e+3|-2295.4630851745605",
|
||||
"0.000510v23k41gd|3e-6|0.000003|0|2.9938054084777835e-6|0.0000029938054084777835",
|
||||
"0.000021kaf857lnbga|2.6e-7|2.6e-7|0.0|2.608635686337948e-7|2.608635686337948e-7",
|
||||
"0.00000235932083a208a46|1.3102e-6|0.0000013102|0.0000|1.3101604580879213e-6|0.0000013101604580879213",
|
||||
"-1426992540.1775446|-3.26657146215e+9|-3266571462.15|-3266571462.15438842773|-3.2665714621543884e+9|-3266571462.1543884",
|
||||
"0.00002du4r7lm6ax|4.561965e-8|4.561965e-8|0.000000|4.5619654655456544e-8|4.5619654655456544e-8",
|
||||
"-175203.734687203033|-1.0878682136535645e+5|-108786.82136535645|-108786.8213653564453125|-1.0878682136535645e+5|-108786.82136535645",
|
||||
"-0.000000000000000000003440541263532051336|-6.54e-18|-6.54e-18|-0.00|-6.5444827079772945e-18|-6.5444827079772945e-18",
|
||||
"-43111754026464.042|-1.10503346e+13|-1.10503346e+13|-11050334572792.05273438|-1.1050334572792053e+13|-11050334572792.053",
|
||||
"0.00000000000043022222412302014000034|4e-9|4e-9|0|3.78470778465271e-9|3.78470778465271e-9",
|
||||
"0.000009680p8ilwq5|4.21395119745284359e-9|4.21395119745284359e-9|0.00000000421395120|4.213951197452844e-9|4.213951197452844e-9",
|
||||
"-16300425014610.112645|-1.85894012451172e+11|-185894012451.172|-185894012451.17187500000000|-1.8589401245117188e+11|-185894012451.17188",
|
||||
"-0.000000423461b1846a782|-6.65136575698852e-8|-6.65136575698852e-8|-0.00000006651366|-6.651365756988524e-8|-6.651365756988524e-8",
|
||||
"-3.6464178562164303e-17|-3.6e-17|-3.6e-17|-0.0|-3.6464178562164303e-17|-3.6464178562164303e-17",
|
||||
"-9fmj79535.3ih|-3.61354500e+12|-3.61354500e+12|-3613545000553.13085938|-3.613545000553131e+12|-3613545000553.131",
|
||||
"-0.00000000000m91917roslj|-1.3354540e-17|-1.3354540e-17|-0.0000000|-1.335453987121582e-17|-1.335453987121582e-17",
|
||||
"-43104012.043220011221102|-3.63007187843322754e+5|-363007.187843322754|-363007.18784332275390625|-3.6300718784332275e+5|-363007.18784332275",
|
||||
"-0.00000000jmrqnrl7og6|-1.8737495e-12|-1.8737495e-12|-0.0000000|-1.873749494552612e-12|-1.873749494552612e-12",
|
||||
"-bkvuw9.0i96a|-5e+8|-5e+8|-455355525|-4.5535552501678467e+8|-455355525.01678467",
|
||||
"0.000000006bcf3h4202i99|8.2498103e-12|8.2498103e-12|0.0000000|8.249810338020325e-12|8.249810338020325e-12",
|
||||
"0.01khcf5021fg99|4e-3|0.004|0|4.01943564414978e-3|0.00401943564414978",
|
||||
"-1yev407ai.i6|-4.5e+12|-4.5e+12|-4466781392693.5|-4.46678139269352e+12|-4466781392693.52",
|
||||
"-0.000000000000000000011103332125155341511|-3.27e-16|-3.27e-16|-0.00|-3.2745227217674256e-16|-3.2745227217674256e-16",
|
||||
"-29574ek1cmn9a|-2e+17|-2e+17|-224635809659957888|-2.246358096599579e+17|-224635809659957900",
|
||||
"-9jh8c.l9gjhf|-3.25863689184188843e+6|-3258636.89184188843|-3258636.89184188842773438|-3.2586368918418884e+6|-3258636.8918418884",
|
||||
"0.0000000000000187dj8c1i8h|2.6656031608581541861e-21|2.6656031608581541861e-21|0.0000000000000000000|2.665603160858154e-21|2.665603160858154e-21",
|
||||
"-20ekb2a.hmbhn|-7.8268289566040039063e+8|-782682895.66040039063|-782682895.6604003906250000000|-7.826828956604004e+8|-782682895.6604004",
|
||||
"0.0000000000000002b497118b483397|1.59559e-17|1.59559e-17|0.00000|1.595590114593506e-17|1.595590114593506e-17",
|
||||
"0.0000620042231631663626|3.7410128116607664238e-4|0.00037410128116607664238|0.0003741012811660766|3.7410128116607664e-4|0.00037410128116607664"
|
||||
],
|
||||
"logs": []
|
||||
}
|
||||
|
|
@ -0,0 +1,5 @@
|
|||
const out = []
|
||||
for (const f of [() => (1).toExponential(101), () => (1).toPrecision(0), () => (1).toFixed(101), () => (1).toString(1), () => (1).toString(37), () => Infinity.toExponential(1000), () => NaN.toPrecision(0), () => (1).toFixed(Infinity)]) { try { out.push(f()) } catch (e) { out.push([e.name, e.message]) } }
|
||||
out.push([0.1, 0.5, 1/3, 2/3, 123.456, -0.1, 1e-7, 3.14159, 1e21, 2**60, 2**60+0.5, 1.7976931348623157e308, 5e-324, 0.000001, 255, -255.5, 0.9999999999999999].map(x => [2, 3, 7, 16, 36].map((r) => x.toString(r)).join(" ")))
|
||||
out.push((1.25).toExponential(1), (1.35).toExponential(1), (9.995).toPrecision(3), (99.99).toPrecision(2), (0.000001).toPrecision(1), (1e-7).toPrecision(1), (123456).toPrecision(2), (-0).toPrecision(2), (0).toExponential(), (-0).toExponential(1), (25).toPrecision(1), (1.0e-10).toExponential(3), (123.456).toExponential(), (123.456).toExponential(0), (5e-324).toExponential(), (-1.5e-7).toExponential(1), (1e21).toPrecision(3), (0.00001234).toPrecision(2), (1.45).toFixed(1), (1e-7).toFixed(10), (999.9).toPrecision(3), (1).toPrecision(100).length, (1/3).toExponential(100).length, (255).toString({ valueOf() { return 16 } }), (1.5).toFixed("2"), (12345.6789).toLocaleString(), (-1e21).toFixed(2), (0.5).toFixed(0), (2.5).toFixed(0), (-0.5).toFixed(0))
|
||||
return out
|
||||
|
|
@ -0,0 +1,82 @@
|
|||
{
|
||||
"bindings": {},
|
||||
"ok": true,
|
||||
"value": [
|
||||
[
|
||||
"RangeError",
|
||||
"toExponential() argument must be between 0 and 100"
|
||||
],
|
||||
[
|
||||
"RangeError",
|
||||
"toPrecision() argument must be between 1 and 100"
|
||||
],
|
||||
[
|
||||
"RangeError",
|
||||
"toFixed() argument must be between 0 and 100"
|
||||
],
|
||||
[
|
||||
"RangeError",
|
||||
"toString() radix argument must be between 2 and 36"
|
||||
],
|
||||
[
|
||||
"RangeError",
|
||||
"toString() radix argument must be between 2 and 36"
|
||||
],
|
||||
"Infinity",
|
||||
"NaN",
|
||||
[
|
||||
"RangeError",
|
||||
"toFixed() argument must be between 0 and 100"
|
||||
],
|
||||
[
|
||||
"0.0001100110011001100110011001100110011001100110011001101 0.0022002200220022002200220022002201 0.04620462046204620463 0.1999999999999a 0.3lllllllllm",
|
||||
"0.1 0.11111111111111111111111111111111112 0.3333333333333333334 0.8 0.i",
|
||||
"0.010101010101010101010101010101010101010101010101010101 0.1 0.2222222222222222222 0.55555555555554 0.c",
|
||||
"0.10101010101010101010101010101010101010101010101010101 0.2 0.4444444444444444444 0.aaaaaaaaaaaaa8 0.o",
|
||||
"1111011.0111010010111100011010100111111011111001110111 11120.11002210211000212022212010001 234.312256641535441 7b.74bc6a7ef9dc 3f.gez4w97ry",
|
||||
"-0.0001100110011001100110011001100110011001100110011001101 -0.0022002200220022002200220022002201 -0.04620462046204620463 -0.1999999999999a -0.3lllllllllm",
|
||||
"0.0000000000000000000000011010110101111111001010011010101111001010111101001 0.000000000000001102202000221202012122200220020101 0.000000004015062102535220433 0.000001ad7f29abcaf48 0.000061oezo085tj",
|
||||
"11.00100100001111110011111000000011011100001100110111 10.0102110122202012020010001000221 3.066364631133534554 3.243f3e0370cdc 3.53i0tuycp",
|
||||
"1101100011010111001001101011011100010111011110101000000000000000000000 100010202110111202020110202012022202010121001 5135235413265003022550266 3635c9adc5dea00000 5v1j4f4ds79m9s",
|
||||
"1000000000000000000000000000000000000000000000000000000000000 21200101122222021102111220121112212101 2031000661631341065361 1000000000000000 8rc4kbdvss1s",
|
||||
"1000000000000000000000000000000000000000000000000000000000000 21200101122222021102111220121112212101 2031000661631341065361 1000000000000000 8rc4kbdvss1s",
|
||||
"1111111111111111111111111111111111111111111111111111100000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 10020200012020012100112000100111021022122212222001221000102201022211210002220120012001210100102121221010102121102012120122212101021201002210000120200221010111201212212100102000000110211220011000211001111011101122010121200202000122010201101100202212110210010010212102001122222220120021022210121002121000012121020221100222012001202111200021110200022201110212120110022120102101120220021102200001222201010202111212222012100102020202121100222110021110221122012020010020002101021002200211100222220102010110112202221110012220210110201122101201000222101001001022220122101120121201002101221011001102020220211200122211111202210111221021101122010102210200202 42326224003605451310554404242624410603406055251244335360504122451145412556002204414340402213252061316665443530166425161224466044502022663322110623024535014021166542443601621160653643446062402342601354252363305333444143005032331550055004054110163453105261322444016604255115302134426043121536061643306155221452533556632312505522062644216061216064405622122411612120255 fffffffffffff800000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000 1a1e4vngaiku6scyil2a1vcbg6qvbzjfseu5nty6qyr6ft0fmxyr3nmwlm21axdq6ed914edar7zmc0m6nphl75ran22ulsb7gk2x0w8eh76j4mr2dvcv9tlpr9qo3ap6my00o4k4hhs2393945uo1rspbz2qhhhvhwp0k4z956e50710y4rp9wvby29lpsvd8xlurk",
|
||||
"0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000001 0.000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000002 0.00000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000004 0.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000003",
|
||||
"0.000000000000000000010000110001101111011110100000101101011110110110001101 0.0000000000001121001021001121110021122222221002 0.00000005523220033662416626 0.000010c6f7a0b5ed8d 0.0001ogs5wo29m7",
|
||||
"11111111 100110 513 ff 73",
|
||||
"-11111111.1 -100110.11111111111111111111111111111 -513.33333333333333333 -ff.8 -73.i",
|
||||
"0.11111111111111111111111111111111111111111111111111111 0.2222222222222222222222222222222221 0.6666666666666666666 0.fffffffffffff8 0.zzzzzzzzzzl"
|
||||
],
|
||||
"1.3e+0",
|
||||
"1.4e+0",
|
||||
"9.99",
|
||||
"1.0e+2",
|
||||
"0.000001",
|
||||
"1e-7",
|
||||
"1.2e+5",
|
||||
"0.0",
|
||||
"0e+0",
|
||||
"0.0e+0",
|
||||
"3e+1",
|
||||
"1.000e-10",
|
||||
"1.23456e+2",
|
||||
"1e+2",
|
||||
"5e-324",
|
||||
"-1.5e-7",
|
||||
"1.00e+21",
|
||||
"0.000012",
|
||||
"1.4",
|
||||
"0.0000001000",
|
||||
"1.00e+3",
|
||||
101,
|
||||
105,
|
||||
"ff",
|
||||
"1.50",
|
||||
"12,345.679",
|
||||
"-1e+21",
|
||||
"1",
|
||||
"3",
|
||||
"-1"
|
||||
],
|
||||
"logs": []
|
||||
}
|
||||
6
packages/codemode-rust/conformance/cases/std-uri.js
Normal file
6
packages/codemode-rust/conformance/cases/std-uri.js
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
const out = []
|
||||
const s = "https://ex.test/a b?q=1&r=é€😀#h;/,+"
|
||||
out.push(encodeURI(s), encodeURIComponent(s), decodeURI(encodeURI(s)), decodeURIComponent(encodeURIComponent(s)), decodeURI("%3B%2F%3f%41%23"), decodeURIComponent("%3B%2F%3f%41%23"), encodeURIComponent("-_.!~*'()"), encodeURI(1), decodeURI(undefined), encodeURIComponent({ toString() { return "a b" } }))
|
||||
for (const f of [() => decodeURIComponent("%"), () => decodeURI("%E0%A4%A"), () => decodeURI("%C0%80"), () => decodeURI("%ED%A0%80"), () => decodeURI("%F8%80%80%80"), () => decodeURIComponent("%zz"), () => decodeURIComponent("%E2%82")]) { try { out.push(f()) } catch (e) { out.push([e.name, e.message, e instanceof URIError]) } }
|
||||
out.push(["a b", "c/d"].map(encodeURIComponent))
|
||||
return out
|
||||
56
packages/codemode-rust/conformance/cases/std-uri.json
Normal file
56
packages/codemode-rust/conformance/cases/std-uri.json
Normal file
|
|
@ -0,0 +1,56 @@
|
|||
{
|
||||
"bindings": {},
|
||||
"ok": true,
|
||||
"value": [
|
||||
"https://ex.test/a%20b?q=1&r=%C3%A9%E2%82%AC%F0%9F%98%80#h;/,+",
|
||||
"https%3A%2F%2Fex.test%2Fa%20b%3Fq%3D1%26r%3D%C3%A9%E2%82%AC%F0%9F%98%80%23h%3B%2F%2C%2B",
|
||||
"https://ex.test/a b?q=1&r=é€😀#h;/,+",
|
||||
"https://ex.test/a b?q=1&r=é€😀#h;/,+",
|
||||
"%3B%2F%3fA%23",
|
||||
";/?A#",
|
||||
"-_.!~*'()",
|
||||
"1",
|
||||
"undefined",
|
||||
"%5Bobject%20Object%5D",
|
||||
[
|
||||
"URIError",
|
||||
"decodeURIComponent received malformed URI data: URI error",
|
||||
true
|
||||
],
|
||||
[
|
||||
"URIError",
|
||||
"decodeURI received malformed URI data: URI error",
|
||||
true
|
||||
],
|
||||
[
|
||||
"URIError",
|
||||
"decodeURI received malformed URI data: URI error",
|
||||
true
|
||||
],
|
||||
[
|
||||
"URIError",
|
||||
"decodeURI received malformed URI data: URI error",
|
||||
true
|
||||
],
|
||||
[
|
||||
"URIError",
|
||||
"decodeURI received malformed URI data: URI error",
|
||||
true
|
||||
],
|
||||
[
|
||||
"URIError",
|
||||
"decodeURIComponent received malformed URI data: URI error",
|
||||
true
|
||||
],
|
||||
[
|
||||
"URIError",
|
||||
"decodeURIComponent received malformed URI data: URI error",
|
||||
true
|
||||
],
|
||||
[
|
||||
"a%20b",
|
||||
"c%2Fd"
|
||||
]
|
||||
],
|
||||
"logs": []
|
||||
}
|
||||
|
|
@ -53,6 +53,7 @@ pub fn setup(vm: &mut Vm) {
|
|||
("flat", 0, a_flat),
|
||||
("flatMap", 1, a_flat_map),
|
||||
("fill", 1, a_fill),
|
||||
("copyWithin", 2, a_copy_within),
|
||||
("at", 1, a_at),
|
||||
("with", 2, a_with),
|
||||
("keys", 0, a_keys),
|
||||
|
|
@ -703,6 +704,21 @@ fn a_fill(vm: &mut Vm, this: Value, args: &[Value], _: Id) -> Res {
|
|||
Ok(this)
|
||||
}
|
||||
|
||||
fn a_copy_within(vm: &mut Vm, this: Value, args: &[Value], _: Id) -> Res {
|
||||
let id = arr_id(vm, &this)?;
|
||||
let n = len(vm, id);
|
||||
let target = to_index(vm, &arg(args, 0), n, 0)?;
|
||||
let start = to_index(vm, &arg(args, 1), n, 0)?;
|
||||
let end = to_index(vm, &arg(args, 2), n, n)?;
|
||||
let items = items_mut(vm, id, false)?;
|
||||
if start < end && target < n {
|
||||
let count = (end - start).min(n - target);
|
||||
let copy: Vec<Value> = items[start..start + count].to_vec();
|
||||
items[target..target + count].copy_from_slice(©);
|
||||
}
|
||||
Ok(this)
|
||||
}
|
||||
|
||||
fn rel_index(vm: &mut Vm, v: &Value, n: usize) -> Result<Option<usize>, Value> {
|
||||
let mut i = to_integer(vm.number_of(v)?);
|
||||
if i < 0.0 {
|
||||
|
|
|
|||
|
|
@ -7,10 +7,12 @@ mod collections;
|
|||
pub mod date;
|
||||
pub mod exotic;
|
||||
pub mod iterator;
|
||||
mod numfmt;
|
||||
mod object;
|
||||
pub mod regexp;
|
||||
mod sets;
|
||||
mod string;
|
||||
mod uri;
|
||||
|
||||
use crate::object::*;
|
||||
use crate::value::{Id, Value};
|
||||
|
|
@ -28,6 +30,7 @@ pub struct StdProtos {
|
|||
pub weak_map: Id,
|
||||
pub weak_set: Id,
|
||||
pub iterator_helper: Id,
|
||||
pub uri_error: Id,
|
||||
}
|
||||
|
||||
/// Global names a program cannot assign to.
|
||||
|
|
@ -59,6 +62,10 @@ pub const GLOBAL_NAMES: &[&str] = &[
|
|||
"WeakMap",
|
||||
"WeakSet",
|
||||
"Iterator",
|
||||
"encodeURI",
|
||||
"encodeURIComponent",
|
||||
"decodeURI",
|
||||
"decodeURIComponent",
|
||||
"TextEncoder",
|
||||
"TextDecoder",
|
||||
"atob",
|
||||
|
|
@ -195,6 +202,7 @@ impl<'rt> Vm<'rt> {
|
|||
bytes::setup(self);
|
||||
buffer::setup(self);
|
||||
sets::setup(self);
|
||||
uri::setup(self);
|
||||
|
||||
let tools = self.tool_ref("");
|
||||
self.realm.tools = tools.as_obj().unwrap_or(0);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,455 @@
|
|||
//! Number formatting with JavaScriptCore's results: radix strings, `toExponential` and `toPrecision`.
|
||||
|
||||
/// The exact decimal digits of a finite positive `x` and the power of ten of the first one.
|
||||
fn exact_digits(x: f64) -> (Vec<u8>, i32) {
|
||||
let s = format!("{:.1100e}", x);
|
||||
let (mantissa, exp) = s.split_once('e').unwrap_or((&s, "0"));
|
||||
let digits: Vec<u8> = mantissa
|
||||
.bytes()
|
||||
.filter(u8::is_ascii_digit)
|
||||
.map(|b| b - b'0')
|
||||
.collect();
|
||||
let end = digits.iter().rposition(|d| *d != 0).map_or(1, |i| i + 1);
|
||||
(digits[..end].to_vec(), exp.parse().unwrap_or(0))
|
||||
}
|
||||
|
||||
/// `n` significant digits of a finite positive `x`, rounded half up on the exact value, and the exponent.
|
||||
fn rounded(x: f64, n: usize) -> (Vec<u8>, i32) {
|
||||
let (mut digits, mut e) = exact_digits(x);
|
||||
let up = digits.get(n).is_some_and(|d| *d >= 5);
|
||||
digits.resize(n, 0);
|
||||
if up {
|
||||
let mut i = n;
|
||||
loop {
|
||||
if i == 0 {
|
||||
digits.insert(0, 1);
|
||||
digits.truncate(n);
|
||||
e += 1;
|
||||
break;
|
||||
}
|
||||
i -= 1;
|
||||
if digits[i] == 9 {
|
||||
digits[i] = 0;
|
||||
} else {
|
||||
digits[i] += 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
(digits, e)
|
||||
}
|
||||
|
||||
/// The shortest round-trip digits of a finite positive `x`, and the exponent.
|
||||
fn shortest(x: f64) -> (Vec<u8>, i32) {
|
||||
let (digits, e) = crate::value::shortest_digits(x);
|
||||
(digits.bytes().map(|b| b - b'0').collect(), e)
|
||||
}
|
||||
|
||||
fn text(d: &[u8]) -> String {
|
||||
d.iter().map(|d| (b'0' + d) as char).collect()
|
||||
}
|
||||
|
||||
fn exponential(sign: &str, digits: &[u8], e: i32) -> String {
|
||||
let mut out = String::from(sign);
|
||||
out.push_str(&text(&digits[..1]));
|
||||
if digits.len() > 1 {
|
||||
out.push('.');
|
||||
out.push_str(&text(&digits[1..]));
|
||||
}
|
||||
out.push('e');
|
||||
out.push(if e < 0 { '-' } else { '+' });
|
||||
out.push_str(&e.abs().to_string());
|
||||
out
|
||||
}
|
||||
|
||||
/// `Number.prototype.toExponential` for a finite `x`; `None` digits means as many as needed.
|
||||
pub fn to_exponential(x: f64, fraction: Option<usize>) -> String {
|
||||
let sign = if x < 0.0 { "-" } else { "" };
|
||||
let x = x.abs();
|
||||
if x == 0.0 {
|
||||
let n = fraction.unwrap_or(0);
|
||||
return exponential("", &vec![0; n + 1], 0);
|
||||
}
|
||||
let (digits, e) = match fraction {
|
||||
Some(f) => rounded(x, f + 1),
|
||||
None => shortest(x),
|
||||
};
|
||||
exponential(sign, &digits, e)
|
||||
}
|
||||
|
||||
/// `Number.prototype.toPrecision` for a finite `x` and a precision in 1..=100.
|
||||
pub fn to_precision(x: f64, p: usize) -> String {
|
||||
let sign = if x < 0.0 { "-" } else { "" };
|
||||
let x = x.abs();
|
||||
let (digits, e) = if x == 0.0 {
|
||||
(vec![0; p], 0)
|
||||
} else {
|
||||
rounded(x, p)
|
||||
};
|
||||
if e < -6 || e >= p as i32 {
|
||||
return exponential(sign, &digits, e);
|
||||
}
|
||||
let mut out = String::from(sign);
|
||||
if e >= 0 {
|
||||
let int = e as usize + 1;
|
||||
out.push_str(&text(&digits[..int]));
|
||||
if p > int {
|
||||
out.push('.');
|
||||
out.push_str(&text(&digits[int..]));
|
||||
}
|
||||
} else {
|
||||
out.push_str("0.");
|
||||
for _ in 0..(-e - 1) {
|
||||
out.push('0');
|
||||
}
|
||||
out.push_str(&text(&digits));
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// The exact digits of a non-negative integral `x` in `radix`.
|
||||
fn integer_digits(x: f64, radix: u32) -> Vec<u32> {
|
||||
if x < 9.007_199_254_740_992e15 {
|
||||
let mut n = x as u64;
|
||||
let mut out = Vec::new();
|
||||
loop {
|
||||
out.push((n % radix as u64) as u32);
|
||||
n /= radix as u64;
|
||||
if n == 0 {
|
||||
break;
|
||||
}
|
||||
}
|
||||
out.reverse();
|
||||
return out;
|
||||
}
|
||||
let bits = x.to_bits();
|
||||
let exp = ((bits >> 52) & 0x7ff) as i64 - 1075;
|
||||
let mantissa = (bits & ((1 << 52) - 1)) | (1 << 52);
|
||||
// Little-endian 32-bit limbs of mantissa * 2^exp (exp > 0 here).
|
||||
let mut limbs: Vec<u64> = vec![mantissa & 0xffff_ffff, mantissa >> 32];
|
||||
for _ in 0..exp {
|
||||
let mut carry = 0;
|
||||
for l in limbs.iter_mut() {
|
||||
let v = (*l << 1) | carry;
|
||||
*l = v & 0xffff_ffff;
|
||||
carry = v >> 32;
|
||||
}
|
||||
if carry > 0 {
|
||||
limbs.push(carry);
|
||||
}
|
||||
}
|
||||
let mut out = Vec::new();
|
||||
while limbs.iter().any(|l| *l != 0) {
|
||||
let mut rem = 0u64;
|
||||
for l in limbs.iter_mut().rev() {
|
||||
let cur = (rem << 32) | *l;
|
||||
*l = cur / radix as u64;
|
||||
rem = cur % radix as u64;
|
||||
}
|
||||
out.push(rem as u32);
|
||||
while limbs.last() == Some(&0) {
|
||||
limbs.pop();
|
||||
}
|
||||
}
|
||||
out.reverse();
|
||||
out
|
||||
}
|
||||
|
||||
/// A non-negative dyadic number with `FRAC` 32-bit limbs after the point: exact for the fraction and the
|
||||
/// half-ulp of any double, as JavaScriptCore's `Uint16WithFraction` is.
|
||||
struct Fixed(Vec<u32>);
|
||||
|
||||
const FRAC: usize = 34;
|
||||
const LIMBS: usize = FRAC + 2;
|
||||
|
||||
impl Fixed {
|
||||
/// `x / 2^shift`, for a finite non-negative double below 2^32.
|
||||
fn new(x: f64, shift: u32) -> Fixed {
|
||||
let bits = x.to_bits();
|
||||
let raw_exp = ((bits >> 52) & 0x7ff) as i64;
|
||||
let (m, e) = if raw_exp == 0 {
|
||||
(bits & ((1 << 52) - 1), -1074)
|
||||
} else {
|
||||
((bits & ((1 << 52) - 1)) | (1 << 52), raw_exp - 1075)
|
||||
};
|
||||
let shift_total = e + (FRAC as i64) * 32 - shift as i64;
|
||||
let mut limbs = vec![0u32; LIMBS];
|
||||
if shift_total >= 0 {
|
||||
let s = shift_total as usize;
|
||||
let (word, bit) = (s / 32, s % 32);
|
||||
let wide = (m as u128) << bit;
|
||||
for k in 0..4 {
|
||||
if word + k < LIMBS {
|
||||
limbs[word + k] = (wide >> (32 * k)) as u32;
|
||||
}
|
||||
}
|
||||
}
|
||||
Fixed(limbs)
|
||||
}
|
||||
|
||||
fn mul_small(&mut self, r: u32) {
|
||||
let mut carry = 0u64;
|
||||
for l in self.0.iter_mut() {
|
||||
let v = *l as u64 * r as u64 + carry;
|
||||
*l = v as u32;
|
||||
carry = v >> 32;
|
||||
}
|
||||
}
|
||||
|
||||
/// Takes the integer part out, leaving the fraction.
|
||||
fn floor_and_subtract(&mut self) -> u32 {
|
||||
let d = self.0[FRAC];
|
||||
self.0[FRAC] = 0;
|
||||
self.0[FRAC + 1] = 0;
|
||||
d
|
||||
}
|
||||
|
||||
fn cmp_half(&self) -> std::cmp::Ordering {
|
||||
let mut half = vec![0u32; LIMBS];
|
||||
half[FRAC - 1] = 1 << 31;
|
||||
self.cmp_limbs(&half)
|
||||
}
|
||||
|
||||
fn cmp_limbs(&self, other: &[u32]) -> std::cmp::Ordering {
|
||||
for i in (0..LIMBS).rev() {
|
||||
match self.0[i].cmp(&other[i]) {
|
||||
std::cmp::Ordering::Equal => {}
|
||||
o => return o,
|
||||
}
|
||||
}
|
||||
std::cmp::Ordering::Equal
|
||||
}
|
||||
|
||||
fn sum_greater_than_one(&self, other: &Fixed) -> bool {
|
||||
let mut sum = vec![0u32; LIMBS];
|
||||
let mut carry = 0u64;
|
||||
for (i, s) in sum.iter_mut().enumerate() {
|
||||
let v = self.0[i] as u64 + other.0[i] as u64 + carry;
|
||||
*s = v as u32;
|
||||
carry = v >> 32;
|
||||
}
|
||||
let mut one = vec![0u32; LIMBS];
|
||||
one[FRAC] = 1;
|
||||
Fixed(sum).cmp_limbs(&one) == std::cmp::Ordering::Greater
|
||||
}
|
||||
}
|
||||
|
||||
fn next_after(x: f64, up: bool) -> f64 {
|
||||
if up {
|
||||
f64::from_bits(x.to_bits() + 1)
|
||||
} else if x == 0.0 {
|
||||
0.0
|
||||
} else {
|
||||
f64::from_bits(x.to_bits() - 1)
|
||||
}
|
||||
}
|
||||
|
||||
/// `Number.prototype.toString(radix)` for radix other than 10, as JavaScriptCore writes it: exact integer digits,
|
||||
/// then the fewest fraction digits that still identify the double.
|
||||
pub fn to_radix(x: f64, radix: u32) -> String {
|
||||
if x.is_nan() {
|
||||
return "NaN".into();
|
||||
}
|
||||
if x.is_infinite() {
|
||||
return if x > 0.0 { "Infinity" } else { "-Infinity" }.into();
|
||||
}
|
||||
let negative = x < 0.0;
|
||||
let number = x.abs();
|
||||
let mut integer = number.floor();
|
||||
let fraction_part = number - integer;
|
||||
let digit_char = |d: u32| std::char::from_digit(d, radix).unwrap_or('0');
|
||||
let mut frac = String::new();
|
||||
if fraction_part != 0.0 {
|
||||
let integer_odd = integer <= 9_007_199_254_740_991.0 && (integer as i64) & 1 == 1;
|
||||
let mut odd_in_odd_radix = integer_odd;
|
||||
let mut digit = integer_odd as u32;
|
||||
let mut fraction = Fixed::new(fraction_part, 0);
|
||||
let mut rounding_up = false;
|
||||
let delta_next = next_after(number, true) - number;
|
||||
let delta_last = number - next_after(number, false);
|
||||
let mut half_next = Fixed::new(delta_next, 1);
|
||||
let mut half_last = Fixed::new(delta_last, 1);
|
||||
loop {
|
||||
let c = fraction.cmp_half();
|
||||
let odd = if radix & 1 == 1 {
|
||||
odd_in_odd_radix
|
||||
} else {
|
||||
digit & 1 == 1
|
||||
};
|
||||
if c == std::cmp::Ordering::Greater || (c == std::cmp::Ordering::Equal && odd) {
|
||||
if fraction.sum_greater_than_one(&half_next) {
|
||||
rounding_up = true;
|
||||
break;
|
||||
}
|
||||
} else if fraction.cmp_limbs(&half_last.0) == std::cmp::Ordering::Less {
|
||||
break;
|
||||
}
|
||||
fraction.mul_small(radix);
|
||||
digit = fraction.floor_and_subtract();
|
||||
frac.push(digit_char(digit));
|
||||
if digit & 1 == 1 {
|
||||
odd_in_odd_radix = !odd_in_odd_radix;
|
||||
}
|
||||
half_next.mul_small(radix);
|
||||
half_last.mul_small(radix);
|
||||
}
|
||||
let top = digit_char(radix - 1);
|
||||
if rounding_up {
|
||||
while frac.ends_with(top) {
|
||||
frac.pop();
|
||||
}
|
||||
match frac.pop() {
|
||||
Some(c) => {
|
||||
let d = c.to_digit(radix).unwrap_or(0);
|
||||
frac.push(digit_char(d + 1));
|
||||
}
|
||||
None => integer += 1.0,
|
||||
}
|
||||
} else {
|
||||
while frac.ends_with('0') {
|
||||
frac.pop();
|
||||
}
|
||||
}
|
||||
}
|
||||
let mut out = String::new();
|
||||
if negative {
|
||||
out.push('-');
|
||||
}
|
||||
out.extend(integer_digits(integer, radix).into_iter().map(digit_char));
|
||||
if !frac.is_empty() {
|
||||
out.push('.');
|
||||
out.push_str(&frac);
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
/// `Math.f16round`: the nearest binary16 value, ties to even, rounded directly from the double.
|
||||
pub fn f16_round(x: f64) -> f64 {
|
||||
if !x.is_finite() || x == 0.0 {
|
||||
return x;
|
||||
}
|
||||
let sign = if x < 0.0 { -1.0 } else { 1.0 };
|
||||
let a = x.abs();
|
||||
if a >= 65520.0 {
|
||||
return sign * f64::INFINITY;
|
||||
}
|
||||
// Spacing of binary16 values around `a`: 2^(e - 10), with subnormals at 2^-24.
|
||||
let e = a.log2().floor().max(-14.0);
|
||||
let mut e = e as i32;
|
||||
if 2f64.powi(e) > a {
|
||||
e -= 1;
|
||||
}
|
||||
let e = e.max(-14);
|
||||
let ulp = 2f64.powi(e - 10);
|
||||
let q = a / ulp;
|
||||
let r = q.round();
|
||||
let r = if (q - q.trunc()) == 0.5 && r % 2.0 != 0.0 {
|
||||
r - 1.0
|
||||
} else {
|
||||
r
|
||||
};
|
||||
sign * r * ulp
|
||||
}
|
||||
|
||||
/// The exact sum of finite doubles, rounded once to the nearest double (ties to even).
|
||||
pub fn sum_precise(values: &[f64]) -> f64 {
|
||||
if values.is_empty() {
|
||||
return -0.0;
|
||||
}
|
||||
let mut inf = 0i8;
|
||||
let mut all_neg_zero = true;
|
||||
for v in values {
|
||||
if v.is_nan() {
|
||||
return f64::NAN;
|
||||
}
|
||||
if v.is_infinite() {
|
||||
let s = if *v > 0.0 { 1 } else { -1 };
|
||||
if inf != 0 && inf != s {
|
||||
return f64::NAN;
|
||||
}
|
||||
inf = s;
|
||||
}
|
||||
if !(*v == 0.0 && v.is_sign_negative()) {
|
||||
all_neg_zero = false;
|
||||
}
|
||||
}
|
||||
if inf != 0 {
|
||||
return inf as f64 * f64::INFINITY;
|
||||
}
|
||||
if all_neg_zero {
|
||||
return -0.0;
|
||||
}
|
||||
// Fixed point with the least significant bit at 2^-1074, in 32-bit limbs held as i64.
|
||||
const LIMBS: usize = 72;
|
||||
let mut acc = [0i64; LIMBS];
|
||||
for v in values {
|
||||
let bits = v.to_bits();
|
||||
let raw = ((bits >> 52) & 0x7ff) as i64;
|
||||
let (m, shift) = if raw == 0 {
|
||||
(bits & ((1 << 52) - 1), 0)
|
||||
} else {
|
||||
((bits & ((1 << 52) - 1)) | (1 << 52), raw - 1)
|
||||
};
|
||||
let s = if v.is_sign_negative() { -1 } else { 1 };
|
||||
let (word, bit) = (shift as usize / 32, shift as usize % 32);
|
||||
let wide = (m as u128) << bit;
|
||||
for k in 0..3 {
|
||||
acc[word + k] += s * (((wide >> (32 * k)) & 0xffff_ffff) as i64);
|
||||
}
|
||||
// Keep limbs bounded.
|
||||
let mut carry = 0i64;
|
||||
for l in acc.iter_mut() {
|
||||
let v = *l + carry;
|
||||
carry = v >> 32;
|
||||
*l = v & 0xffff_ffff;
|
||||
}
|
||||
acc[LIMBS - 1] += carry << 32;
|
||||
}
|
||||
let negative = acc[LIMBS - 1] < 0;
|
||||
if negative {
|
||||
let mut borrow = 0i64;
|
||||
for l in acc.iter_mut() {
|
||||
let v = -*l - borrow;
|
||||
borrow = if v < 0 { 1 } else { 0 };
|
||||
*l = v & 0xffff_ffff;
|
||||
}
|
||||
}
|
||||
let Some(top) = acc.iter().rposition(|l| *l != 0) else {
|
||||
return 0.0;
|
||||
};
|
||||
// The magnitude's bits, most significant first, then round to 53 bits.
|
||||
let bits_len = top * 32 + (64 - (acc[top] as u64).leading_zeros() as usize);
|
||||
let bit = |i: usize| (acc[i / 32] >> (i % 32)) & 1 == 1;
|
||||
let keep = if bits_len > 53 { 53 } else { bits_len };
|
||||
let low = bits_len - keep;
|
||||
let mut mant: u64 = 0;
|
||||
for i in (low..bits_len).rev() {
|
||||
mant = (mant << 1) | bit(i) as u64;
|
||||
}
|
||||
// Subnormal results keep fewer bits: the lowest kept bit may not go below 2^-1074.
|
||||
let mut value = if low > 0 {
|
||||
let half = bit(low - 1);
|
||||
let sticky = (0..low - 1).any(bit);
|
||||
if half && (sticky || mant & 1 == 1) {
|
||||
mant += 1;
|
||||
}
|
||||
mant as f64 * pow2(low as i64 - 1074)
|
||||
} else {
|
||||
mant as f64 * pow2(-1074)
|
||||
};
|
||||
if !value.is_finite() {
|
||||
value = f64::INFINITY;
|
||||
}
|
||||
if negative { -value } else { value }
|
||||
}
|
||||
|
||||
/// 2^k for k in -1074..=1023, exactly.
|
||||
fn pow2(k: i64) -> f64 {
|
||||
if k > 1023 {
|
||||
f64::INFINITY
|
||||
} else if k >= -1022 {
|
||||
f64::from_bits(((k + 1023) as u64) << 52)
|
||||
} else {
|
||||
f64::from_bits(1u64 << (k + 1074).max(0))
|
||||
}
|
||||
}
|
||||
|
|
@ -87,6 +87,9 @@ pub fn setup(vm: &mut Vm) {
|
|||
let (n, m) = (vm.static_str(name), vm.static_str(""));
|
||||
vm.define_hidden(proto, nk, n);
|
||||
vm.define_hidden(proto, mk, m);
|
||||
if name == "URIError" {
|
||||
vm.realm.std.uri_error = proto;
|
||||
}
|
||||
}
|
||||
let ep = vm.realm.error_proto;
|
||||
vm.method(ep, "toString", 0, error_to_string);
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ use crate::object::*;
|
|||
use crate::ops::MAX_STRING_LEN;
|
||||
use crate::strings::{StrId, StrRef};
|
||||
use crate::value::{
|
||||
Id, Value, is_js_whitespace, num_to_fixed, num_to_radix, num_to_string, to_integer, to_uint32,
|
||||
Id, Value, is_js_whitespace, num_to_fixed, num_to_string, to_integer, to_uint32,
|
||||
};
|
||||
use crate::vm::{Res, Vm};
|
||||
|
||||
|
|
@ -96,6 +96,7 @@ pub fn setup(vm: &mut Vm) {
|
|||
("toFixed", 1, n_to_fixed),
|
||||
("toString", 1, n_to_string),
|
||||
("toPrecision", 1, n_to_precision),
|
||||
("toExponential", 1, n_to_exponential),
|
||||
("valueOf", 0, n_value_of),
|
||||
("toLocaleString", 0, n_to_locale_string),
|
||||
],
|
||||
|
|
@ -144,6 +145,8 @@ pub fn setup(vm: &mut Vm) {
|
|||
("acosh", 1, m_acosh),
|
||||
("atanh", 1, m_atanh),
|
||||
("fround", 1, m_fround),
|
||||
("f16round", 1, m_f16round),
|
||||
("sumPrecise", 1, m_sum_precise),
|
||||
("clz32", 1, m_clz32),
|
||||
("atan2", 2, m_atan2),
|
||||
("pow", 2, m_pow),
|
||||
|
|
@ -833,12 +836,14 @@ fn n_to_fixed(vm: &mut Vm, this: Value, args: &[Value], _: Id) -> Res {
|
|||
let x = this_num(vm, &this)?;
|
||||
let d = to_integer(vm.number_of(&arg(args, 0))?);
|
||||
if !(0.0..=100.0).contains(&d) {
|
||||
return Err(vm.range_error("toFixed() digits argument must be between 0 and 100"));
|
||||
return Err(vm.range_error("toFixed() argument must be between 0 and 100"));
|
||||
}
|
||||
if x.abs() >= 1e21 {
|
||||
return Ok(vm.string_val(num_to_string(x)));
|
||||
}
|
||||
Ok(vm.string_val(num_to_fixed(x, d as usize)))
|
||||
// The sign stays even when the digits round to zero: `(-0.0001).toFixed(2)` is "-0.00".
|
||||
let sign = if x < 0.0 { "-" } else { "" };
|
||||
Ok(vm.string_val(format!("{sign}{}", num_to_fixed(x.abs(), d as usize))))
|
||||
}
|
||||
|
||||
fn n_to_string(vm: &mut Vm, this: Value, args: &[Value], _: Id) -> Res {
|
||||
|
|
@ -848,44 +853,45 @@ fn n_to_string(vm: &mut Vm, this: Value, args: &[Value], _: Id) -> Res {
|
|||
v => to_integer(vm.number_of(&v)?),
|
||||
};
|
||||
if !(2.0..=36.0).contains(&radix) {
|
||||
return Err(vm.range_error("toString() radix must be between 2 and 36"));
|
||||
return Err(vm.range_error("toString() radix argument must be between 2 and 36"));
|
||||
}
|
||||
Ok(vm.string_val(if radix == 10.0 {
|
||||
num_to_string(x)
|
||||
} else {
|
||||
num_to_radix(x, radix as u32)
|
||||
super::numfmt::to_radix(x, radix as u32)
|
||||
}))
|
||||
}
|
||||
|
||||
fn n_to_exponential(vm: &mut Vm, this: Value, args: &[Value], _: Id) -> Res {
|
||||
let x = this_num(vm, &this)?;
|
||||
let digits = match arg(args, 0) {
|
||||
Value::Undef => None,
|
||||
v => Some(to_integer(vm.number_of(&v)?)),
|
||||
};
|
||||
if !x.is_finite() {
|
||||
return Ok(vm.string_val(num_to_string(x)));
|
||||
}
|
||||
if digits.is_some_and(|d| !(0.0..=100.0).contains(&d)) {
|
||||
return Err(vm.range_error("toExponential() argument must be between 0 and 100"));
|
||||
}
|
||||
let out = super::numfmt::to_exponential(x, digits.map(|d| d as usize));
|
||||
Ok(vm.string_val(out))
|
||||
}
|
||||
|
||||
fn n_to_precision(vm: &mut Vm, this: Value, args: &[Value], _: Id) -> Res {
|
||||
let x = this_num(vm, &this)?;
|
||||
if let Value::Undef = arg(args, 0) {
|
||||
return Ok(vm.string_val(num_to_string(x)));
|
||||
}
|
||||
let p = to_integer(vm.number_of(&arg(args, 0))?);
|
||||
if !x.is_finite() {
|
||||
return Ok(vm.string_val(num_to_string(x)));
|
||||
}
|
||||
if !(1.0..=100.0).contains(&p) {
|
||||
return Err(vm.range_error("toPrecision() argument must be between 1 and 100"));
|
||||
}
|
||||
if !x.is_finite() || x == 0.0 {
|
||||
return Ok(vm.string_val(if x == 0.0 {
|
||||
num_to_fixed(0.0, p as usize - 1)
|
||||
} else {
|
||||
num_to_string(x)
|
||||
}));
|
||||
}
|
||||
let e = x.abs().log10().floor() as i32;
|
||||
let p = p as i32;
|
||||
if e < -6 || e >= p {
|
||||
let s = format!("{:.*e}", (p - 1) as usize, x);
|
||||
let (m, ex) = s.split_once('e').unwrap_or((&s, "0"));
|
||||
let ex: i32 = ex.parse().unwrap_or(0);
|
||||
return Ok(vm.string_val(format!(
|
||||
"{m}e{}{}",
|
||||
if ex < 0 { "-" } else { "+" },
|
||||
ex.abs()
|
||||
)));
|
||||
}
|
||||
Ok(vm.string_val(num_to_fixed(x, (p - 1 - e).max(0) as usize)))
|
||||
let out = super::numfmt::to_precision(x, p as usize);
|
||||
Ok(vm.string_val(out))
|
||||
}
|
||||
|
||||
fn n_value_of(vm: &mut Vm, this: Value, _args: &[Value], _: Id) -> Res {
|
||||
|
|
@ -969,6 +975,7 @@ math1!(m_asinh, f64::asinh);
|
|||
math1!(m_acosh, f64::acosh);
|
||||
math1!(m_atanh, f64::atanh);
|
||||
math1!(m_fround, |x| x as f32 as f64);
|
||||
math1!(m_f16round, super::numfmt::f16_round);
|
||||
math1!(m_clz32, |x| to_uint32(x).leading_zeros() as f64);
|
||||
math1!(m_sign, |x| if x.is_nan() || x == 0.0 {
|
||||
x
|
||||
|
|
@ -984,6 +991,23 @@ math1!(m_round, |x| {
|
|||
if v == 0.0 && x < 0.0 { -0.0 } else { v }
|
||||
});
|
||||
|
||||
fn m_sum_precise(vm: &mut Vm, _this: Value, args: &[Value], _: Id) -> Res {
|
||||
let it = vm.get_iterator(&arg(args, 0))?;
|
||||
let mut values = Vec::new();
|
||||
while let Some(v) = vm.iter_step(&it)? {
|
||||
let Value::Num(n) = v else {
|
||||
let _ = vm.iter_close(&it);
|
||||
return Err(vm.type_error("Math.sumPrecise expects an iterable of numbers."));
|
||||
};
|
||||
if values.len() >= crate::ops::MAX_ARRAY_LEN {
|
||||
let _ = vm.iter_close(&it);
|
||||
return Err(vm.range_error("Invalid array length"));
|
||||
}
|
||||
values.push(n);
|
||||
}
|
||||
Ok(Value::Num(super::numfmt::sum_precise(&values)))
|
||||
}
|
||||
|
||||
fn m_atan2(vm: &mut Vm, _this: Value, args: &[Value], _: Id) -> Res {
|
||||
let (y, x) = (n0(vm, args)?, n1(vm, args)?);
|
||||
Ok(Value::Num(y.atan2(x)))
|
||||
|
|
|
|||
128
packages/codemode-rust/crates/psychoscript/src/builtins/uri.rs
Normal file
128
packages/codemode-rust/crates/psychoscript/src/builtins/uri.rs
Normal file
|
|
@ -0,0 +1,128 @@
|
|||
//! encodeURI, encodeURIComponent, decodeURI and decodeURIComponent.
|
||||
|
||||
use super::arg;
|
||||
use crate::value::{Id, Value};
|
||||
use crate::vm::{Res, Vm};
|
||||
|
||||
const URI_MARKS: &str = "-_.!~*'()";
|
||||
const URI_RESERVED: &str = ";/?:@&=+$,";
|
||||
|
||||
pub fn setup(vm: &mut Vm) {
|
||||
for (name, f) in [
|
||||
("encodeURI", encode_uri as crate::vm::NativeFn),
|
||||
("encodeURIComponent", encode_uri_component),
|
||||
("decodeURI", decode_uri),
|
||||
("decodeURIComponent", decode_uri_component),
|
||||
] {
|
||||
let v = vm.native_fn(name, 1, f, Value::Undef);
|
||||
vm.global(name, v);
|
||||
}
|
||||
}
|
||||
|
||||
fn encode(s: &str, keep: &str) -> String {
|
||||
let mut out = String::with_capacity(s.len());
|
||||
for c in s.chars() {
|
||||
if c.is_ascii_alphanumeric() || keep.contains(c) {
|
||||
out.push(c);
|
||||
} else {
|
||||
let mut buf = [0u8; 4];
|
||||
for b in c.encode_utf8(&mut buf).bytes() {
|
||||
out.push_str(&format!("%{b:02X}"));
|
||||
}
|
||||
}
|
||||
}
|
||||
out
|
||||
}
|
||||
|
||||
fn hex(b: &[u8], i: usize) -> Option<u8> {
|
||||
if b.get(i) != Some(&b'%') {
|
||||
return None;
|
||||
}
|
||||
let h = (*b.get(i + 1)? as char).to_digit(16)?;
|
||||
let l = (*b.get(i + 2)? as char).to_digit(16)?;
|
||||
Some((h * 16 + l) as u8)
|
||||
}
|
||||
|
||||
/// Decodes `%XX` escapes as UTF-8, leaving escapes of the `reserved` characters as they are.
|
||||
fn decode(s: &str, reserved: &str) -> Option<String> {
|
||||
let b = s.as_bytes();
|
||||
let mut out: Vec<u8> = Vec::with_capacity(b.len());
|
||||
let mut i = 0;
|
||||
while i < b.len() {
|
||||
if b[i] != b'%' {
|
||||
out.push(b[i]);
|
||||
i += 1;
|
||||
continue;
|
||||
}
|
||||
let lead = hex(b, i)?;
|
||||
if lead < 0x80 {
|
||||
if reserved.contains(lead as char) {
|
||||
out.extend_from_slice(&b[i..i + 3]);
|
||||
} else {
|
||||
out.push(lead);
|
||||
}
|
||||
i += 3;
|
||||
continue;
|
||||
}
|
||||
let n = match lead {
|
||||
0xc0..=0xdf => 2,
|
||||
0xe0..=0xef => 3,
|
||||
0xf0..=0xf7 => 4,
|
||||
_ => return None,
|
||||
};
|
||||
let mut seq = vec![lead];
|
||||
let mut j = i + 3;
|
||||
for _ in 1..n {
|
||||
let c = hex(b, j)?;
|
||||
if c & 0xc0 != 0x80 {
|
||||
return None;
|
||||
}
|
||||
seq.push(c);
|
||||
j += 3;
|
||||
}
|
||||
// from_utf8 rejects overlong forms, surrogates and code points above U+10FFFF, as the spec does.
|
||||
let ch = std::str::from_utf8(&seq).ok()?;
|
||||
out.extend_from_slice(ch.as_bytes());
|
||||
i = j;
|
||||
}
|
||||
String::from_utf8(out).ok()
|
||||
}
|
||||
|
||||
fn input(vm: &mut Vm, args: &[Value]) -> Result<String, Value> {
|
||||
super::builtin_string(vm, &arg(args, 0))
|
||||
}
|
||||
|
||||
fn run(vm: &mut Vm, args: &[Value], name: &str, f: impl Fn(&str) -> Option<String>) -> Res {
|
||||
let s = input(vm, args)?;
|
||||
match f(&s) {
|
||||
Some(out) => Ok(vm.string_val(out)),
|
||||
None => {
|
||||
let p = vm.realm.std.uri_error;
|
||||
Err(vm.failure(
|
||||
p,
|
||||
&format!("{name} received malformed URI data: URI error"),
|
||||
crate::DiagnosticKind::ExecutionFailure,
|
||||
))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fn encode_uri(vm: &mut Vm, _this: Value, args: &[Value], _: Id) -> Res {
|
||||
let keep = format!("{URI_RESERVED}{URI_MARKS}#");
|
||||
run(vm, args, "encodeURI", |s| Some(encode(s, &keep)))
|
||||
}
|
||||
|
||||
fn encode_uri_component(vm: &mut Vm, _this: Value, args: &[Value], _: Id) -> Res {
|
||||
run(vm, args, "encodeURIComponent", |s| {
|
||||
Some(encode(s, URI_MARKS))
|
||||
})
|
||||
}
|
||||
|
||||
fn decode_uri(vm: &mut Vm, _this: Value, args: &[Value], _: Id) -> Res {
|
||||
let reserved = format!("{URI_RESERVED}#");
|
||||
run(vm, args, "decodeURI", |s| decode(s, &reserved))
|
||||
}
|
||||
|
||||
fn decode_uri_component(vm: &mut Vm, _this: Value, args: &[Value], _: Id) -> Res {
|
||||
run(vm, args, "decodeURIComponent", |s| decode(s, ""))
|
||||
}
|
||||
|
|
@ -37,6 +37,74 @@ impl Value {
|
|||
}
|
||||
}
|
||||
|
||||
/// The shortest decimal digits that round-trip a finite positive `x`, and the power of ten of the first. Of two
|
||||
/// equally close candidates JavaScript takes the even one, where Rust's formatter may take the other.
|
||||
pub fn shortest_digits(x: f64) -> (String, i32) {
|
||||
let e = format!("{x:e}");
|
||||
let (mantissa, exp) = e.split_once('e').unwrap_or((&e, "0"));
|
||||
let exp: i32 = exp.parse().unwrap_or(0);
|
||||
let digits: String = mantissa.chars().filter(|c| *c != '.').collect();
|
||||
let last = digits.as_bytes()[digits.len() - 1] - b'0';
|
||||
if last.is_multiple_of(2) || digits.len() > 17 {
|
||||
return (digits, exp);
|
||||
}
|
||||
// A tie means x is exactly halfway to a neighbour: equal to these digits followed by a 5, one way or the other.
|
||||
let k = digits.len();
|
||||
let below = format!("{}{}5", &digits[..k - 1], last - 1);
|
||||
let above = format!("{digits}5");
|
||||
let neighbour = if equals_decimal(x, &below, exp - k as i32) {
|
||||
Some(last - 1)
|
||||
} else if last < 9 && equals_decimal(x, &above, exp - k as i32) {
|
||||
Some(last + 1)
|
||||
} else {
|
||||
None
|
||||
};
|
||||
if let Some(d) = neighbour {
|
||||
let candidate = format!("{}{}", &digits[..k - 1], d);
|
||||
let text = format!("{}.{}e{}", &candidate[..1], &candidate[1..], exp);
|
||||
if text.parse::<f64>().ok() == Some(x) {
|
||||
return (candidate, exp);
|
||||
}
|
||||
}
|
||||
(digits, exp)
|
||||
}
|
||||
|
||||
/// Whether the finite positive `x` is exactly the decimal `digits` × 10^`q`; false when that cannot be decided in
|
||||
/// 128-bit integers, which only happens far from any tie a double can make.
|
||||
fn equals_decimal(x: f64, digits: &str, q: i32) -> bool {
|
||||
let Ok(d) = digits.parse::<u128>() else {
|
||||
return false;
|
||||
};
|
||||
let bits = x.to_bits();
|
||||
let raw = ((bits >> 52) & 0x7ff) as i32;
|
||||
let (mut m, mut p) = if raw == 0 {
|
||||
(bits & ((1 << 52) - 1), -1074)
|
||||
} else {
|
||||
((bits & ((1 << 52) - 1)) | (1 << 52), raw - 1075)
|
||||
};
|
||||
while m & 1 == 0 && m != 0 {
|
||||
m >>= 1;
|
||||
p += 1;
|
||||
}
|
||||
let (mut lhs, mut rhs) = (m as u128, d);
|
||||
let shift = |v: u128, n: u32| v.checked_mul(1u128.checked_shl(n)?);
|
||||
let scale = |v: u128, n: u32| v.checked_mul(10u128.checked_pow(n)?);
|
||||
let r = (|| {
|
||||
if p >= 0 {
|
||||
lhs = shift(lhs, p as u32)?;
|
||||
} else {
|
||||
rhs = shift(rhs, (-p) as u32)?;
|
||||
}
|
||||
if q >= 0 {
|
||||
rhs = scale(rhs, q as u32)?;
|
||||
} else {
|
||||
lhs = scale(lhs, (-q) as u32)?;
|
||||
}
|
||||
Some(lhs == rhs)
|
||||
})();
|
||||
r.unwrap_or(false)
|
||||
}
|
||||
|
||||
/// `Number.prototype.toString()` with radix 10.
|
||||
pub fn num_to_string(x: f64) -> String {
|
||||
let mut out = String::new();
|
||||
|
|
@ -57,21 +125,14 @@ pub fn write_num(out: &mut String, x: f64) {
|
|||
out.push_str(if x > 0.0 { "Infinity" } else { "-Infinity" });
|
||||
return;
|
||||
}
|
||||
if x.fract() == 0.0 && x.abs() < 1e21 {
|
||||
if x.abs() < 9.0e18 {
|
||||
let _ = write!(out, "{}", x as i64);
|
||||
return;
|
||||
}
|
||||
let _ = write!(out, "{x}");
|
||||
if x.fract() == 0.0 && x.abs() < 9_007_199_254_740_992.0 {
|
||||
let _ = write!(out, "{}", x as i64);
|
||||
return;
|
||||
}
|
||||
if x < 0.0 {
|
||||
out.push('-');
|
||||
}
|
||||
let e = format!("{:e}", x.abs());
|
||||
let (mantissa, exp) = e.split_once('e').unwrap_or((&e, "0"));
|
||||
let exp: i32 = exp.parse().unwrap_or(0);
|
||||
let digits: String = mantissa.chars().filter(|c| *c != '.').collect();
|
||||
let (digits, exp) = shortest_digits(x.abs());
|
||||
let k = digits.len() as i32;
|
||||
let n = exp + 1;
|
||||
if k <= n && n <= 21 {
|
||||
|
|
@ -102,47 +163,6 @@ pub fn write_num(out: &mut String, x: f64) {
|
|||
}
|
||||
}
|
||||
|
||||
/// `Number.prototype.toString(radix)` for radix other than 10.
|
||||
pub fn num_to_radix(x: f64, radix: u32) -> String {
|
||||
if x.is_nan() {
|
||||
return "NaN".into();
|
||||
}
|
||||
if x.is_infinite() {
|
||||
return if x > 0.0 {
|
||||
"Infinity".into()
|
||||
} else {
|
||||
"-Infinity".into()
|
||||
};
|
||||
}
|
||||
let neg = x < 0.0;
|
||||
let x = x.abs();
|
||||
let mut int = x.trunc();
|
||||
let mut frac = x - int;
|
||||
let mut digits = Vec::new();
|
||||
if int == 0.0 {
|
||||
digits.push(b'0');
|
||||
}
|
||||
while int >= 1.0 {
|
||||
let d = (int % radix as f64) as u32;
|
||||
digits.push(std::char::from_digit(d, radix).unwrap_or('0') as u8);
|
||||
int = (int / radix as f64).trunc();
|
||||
}
|
||||
digits.reverse();
|
||||
let mut s = String::from_utf8(digits).unwrap_or_default();
|
||||
if frac > 0.0 {
|
||||
s.push('.');
|
||||
let mut n = 0;
|
||||
while frac > 0.0 && n < 52 {
|
||||
frac *= radix as f64;
|
||||
let d = frac.trunc() as u32;
|
||||
s.push(std::char::from_digit(d, radix).unwrap_or('0'));
|
||||
frac -= d as f64;
|
||||
n += 1;
|
||||
}
|
||||
}
|
||||
if neg { format!("-{s}") } else { s }
|
||||
}
|
||||
|
||||
/// `Number.prototype.toFixed`, rounding the exact binary value half away from zero like JavaScript.
|
||||
pub fn num_to_fixed(x: f64, digits: usize) -> String {
|
||||
if !x.is_finite() {
|
||||
|
|
@ -370,7 +390,6 @@ mod tests {
|
|||
assert_eq!(num_to_fixed(1.23456, 2), "1.23");
|
||||
assert_eq!(num_to_fixed(2.5, 0), "3");
|
||||
assert_eq!(num_to_fixed(1.005, 2), "1.00");
|
||||
assert_eq!(num_to_radix(255.0, 16), "ff");
|
||||
}
|
||||
|
||||
#[test]
|
||||
|
|
|
|||
|
|
@ -12,21 +12,7 @@ built-ins/Array/isArray/15.4.3.2-0-5.js # wrong result
|
|||
built-ins/Array/length/S15.4.4_A1.3_T1.js # wrong result
|
||||
built-ins/Array/length/S15.4.5.1_A1.2_T3.js # wrong result
|
||||
built-ins/Array/length/S15.4.5.2_A3_T4.js # uncaught RangeError: Invalid array length
|
||||
built-ins/Array/prototype/copyWithin/coerced-values-end.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/coerced-values-start.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/coerced-values-target.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/fill-holes.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/negative-end.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/negative-out-of-bounds-end.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/negative-out-of-bounds-start.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/negative-out-of-bounds-target.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/negative-start.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/negative-target.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/non-negative-out-of-bounds-end.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/non-negative-out-of-bounds-target-and-start.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/non-negative-target-and-start.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/non-negative-target-start-and-end.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/undefined-end.js # call of a missing method
|
||||
built-ins/Array/prototype/copyWithin/fill-holes.js # wrong result
|
||||
built-ins/Array/prototype/every/15.4.4.16-7-4.js # wrong result
|
||||
built-ins/Array/prototype/every/15.4.4.16-7-5.js # wrong result
|
||||
built-ins/Array/prototype/every/15.4.4.16-7-b-1.js # wrong result
|
||||
|
|
@ -116,22 +102,9 @@ built-ins/Function/prototype/bind/instance-length-remaining-args.js # wrong res
|
|||
built-ins/JSON/parse/reviver-array-get-prop-from-prototype.js # wrong result
|
||||
built-ins/JSON/stringify/value-string-escape-unicode.js # wrong result
|
||||
built-ins/Math/hypot/Math.hypot_ToNumberErr.js # error not thrown: Test262Error
|
||||
built-ins/Math/sumPrecise/sum-is-NaN.js # call of a missing method
|
||||
built-ins/Math/sumPrecise/sum-is-infinite.js # call of a missing method
|
||||
built-ins/Math/sumPrecise/sum-is-minus-zero.js # call of a missing method
|
||||
built-ins/Math/sumPrecise/sum.js # call of a missing method
|
||||
built-ins/Math/sumPrecise/throws-on-non-number.js # wrong result
|
||||
built-ins/Number/S9.3.1_A2_U180E.js # interpreter panic
|
||||
built-ins/Number/S9.3.1_A3_T1_U180E.js # interpreter panic
|
||||
built-ins/Number/S9.3.1_A3_T2_U180E.js # interpreter panic
|
||||
built-ins/Number/prototype/S15.7.4_A3.6.js # wrong result
|
||||
built-ins/Number/prototype/toExponential/range.js # call of a missing method
|
||||
built-ins/Number/prototype/toExponential/return-abrupt-tointeger-fractiondigits.js # wrong error type: TypeError instead of Test262Error
|
||||
built-ins/Number/prototype/toExponential/return-values.js # call of a missing method
|
||||
built-ins/Number/prototype/toExponential/this-is-0-fractiondigits-is-not-0.js # call of a missing method
|
||||
built-ins/Number/prototype/toExponential/tointeger-fractiondigits.js # call of a missing method
|
||||
built-ins/Number/prototype/toExponential/undefined-fractiondigits.js # call of a missing method
|
||||
built-ins/Number/prototype/toFixed/exactness.js # wrong result
|
||||
built-ins/Object/fromEntries/iterator-closed-for-null-entry.js # wrong error type: Test262Error instead of TypeError
|
||||
built-ins/Object/fromEntries/iterator-closed-for-string-entry.js # wrong error type: Test262Error instead of TypeError
|
||||
built-ins/Object/fromEntries/string-entry-primitive-throws.js # error not thrown: TypeError
|
||||
|
|
@ -241,77 +214,10 @@ built-ins/String/raw/special-characters.js # unsupported syntax: tagged templat
|
|||
built-ins/String/raw/template-substitutions-are-appended-on-same-index.js # unsupported syntax: tagged templates
|
||||
built-ins/String/raw/zero-literal-segments.js # unsupported syntax: tagged templates
|
||||
built-ins/StringIteratorPrototype/next/next-iteration-surrogate-pairs.js # wrong result
|
||||
built-ins/decodeURI/S15.1.3.1_A1.10_T1.js # wrong result
|
||||
built-ins/decodeURI/S15.1.3.1_A1.11_T1.js # wrong result
|
||||
built-ins/decodeURI/S15.1.3.1_A1.11_T2.js # wrong result
|
||||
built-ins/decodeURI/S15.1.3.1_A1.12_T1.js # wrong result
|
||||
built-ins/decodeURI/S15.1.3.1_A1.12_T2.js # wrong result
|
||||
built-ins/decodeURI/S15.1.3.1_A1.12_T3.js # wrong result
|
||||
built-ins/decodeURI/S15.1.3.1_A1.1_T1.js # wrong result
|
||||
built-ins/decodeURI/S15.1.3.1_A1.2_T1.js # wrong result
|
||||
built-ins/decodeURI/S15.1.3.1_A1.2_T2.js # wrong result
|
||||
built-ins/decodeURI/S15.1.3.1_A3_T1.js # missing global: decodeURI
|
||||
built-ins/decodeURI/S15.1.3.1_A3_T2.js # missing global: decodeURI
|
||||
built-ins/decodeURI/S15.1.3.1_A3_T3.js # missing global: decodeURI
|
||||
built-ins/decodeURI/S15.1.3.1_A4_T1.js # missing global: decodeURI
|
||||
built-ins/decodeURI/S15.1.3.1_A4_T2.js # missing global: decodeURI
|
||||
built-ins/decodeURI/S15.1.3.1_A4_T3.js # missing global: decodeURI
|
||||
built-ins/decodeURI/S15.1.3.1_A4_T4.js # missing global: decodeURI
|
||||
built-ins/decodeURI/S15.1.3.1_A5.1.js # missing global: decodeURI
|
||||
built-ins/decodeURI/S15.1.3.1_A5.2.js # missing global: decodeURI
|
||||
built-ins/decodeURI/S15.1.3.1_A5.4.js # missing global: decodeURI
|
||||
built-ins/decodeURI/S15.1.3.1_A5.6.js # missing global: decodeURI
|
||||
built-ins/decodeURI/S15.1.3.1_A5.7.js # missing global: decodeURI
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A1.10_T1.js # wrong result
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A1.11_T1.js # wrong result
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A1.11_T2.js # wrong result
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A1.12_T1.js # wrong result
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A1.12_T2.js # wrong result
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A1.12_T3.js # wrong result
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A1.1_T1.js # wrong result
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A1.2_T1.js # wrong result
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A1.2_T2.js # wrong result
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A3_T1.js # missing global: decodeURIComponent
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A3_T2.js # missing global: decodeURIComponent
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A3_T3.js # missing global: decodeURIComponent
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A4_T1.js # missing global: decodeURIComponent
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A4_T2.js # missing global: decodeURIComponent
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A4_T3.js # missing global: decodeURIComponent
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A4_T4.js # missing global: decodeURIComponent
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A5.1.js # missing global: decodeURIComponent
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A5.2.js # missing global: decodeURIComponent
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A5.4.js # missing global: decodeURIComponent
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A5.6.js # missing global: decodeURIComponent
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A5.7.js # missing global: decodeURIComponent
|
||||
built-ins/decodeURIComponent/throw-URIError.js # missing global: decodeURIComponent
|
||||
built-ins/encodeURI/S15.1.3.3_A3.1_T1.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A3.2_T1.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A3.2_T2.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A3.2_T3.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A3.3_T1.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A4_T1.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A4_T2.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A4_T3.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A4_T4.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A5.1.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A5.2.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A5.4.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A5.6.js # missing global: encodeURI
|
||||
built-ins/encodeURI/S15.1.3.3_A5.7.js # missing global: encodeURI
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A3.1_T1.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A3.2_T1.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A3.2_T2.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A3.2_T3.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A3.3_T1.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A4_T1.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A4_T2.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A4_T3.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A4_T4.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A5.1.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A5.2.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A5.4.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A5.6.js # missing global: encodeURIComponent
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A5.7.js # missing global: encodeURIComponent
|
||||
built-ins/decodeURI/S15.1.3.1_A5.2.js # wrong result
|
||||
built-ins/decodeURIComponent/S15.1.3.2_A5.2.js # wrong result
|
||||
built-ins/encodeURI/S15.1.3.3_A5.2.js # wrong result
|
||||
built-ins/encodeURIComponent/S15.1.3.4_A5.2.js # wrong result
|
||||
built-ins/global/10.2.1.1.3-4-18-s.js # missing global: undefined
|
||||
language/arguments-object/10.5-7-b-2-s.js # wrong result
|
||||
language/arguments-object/10.5-7-b-3-s.js # wrong result
|
||||
|
|
|
|||
|
|
@ -22,9 +22,6 @@ built-ins/Array/prototype/concat/create-ctor-non-object.js # a.concat() throws
|
|||
built-ins/Array/prototype/copyWithin/call-with-boolean.js # TypeError: Array.prototype.copyWithin called on incompatible receiver a boolean.
|
||||
built-ins/Array/prototype/copyWithin/coerced-values-start-change-target.js # Array.copyWithin expects start to be a number.
|
||||
built-ins/Array/prototype/copyWithin/length-near-integer-limit.js # TypeError: Array.prototype.copyWithin called on incompatible receiver a data object.
|
||||
built-ins/Array/prototype/copyWithin/return-abrupt-from-end.js # Expected a Test262Error but got a TypeError
|
||||
built-ins/Array/prototype/copyWithin/return-abrupt-from-start.js # Expected a Test262Error but got a TypeError
|
||||
built-ins/Array/prototype/copyWithin/return-abrupt-from-target.js # Expected a Test262Error but got a TypeError
|
||||
built-ins/Array/prototype/copyWithin/return-this.js # TypeError: Array.prototype.copyWithin called on incompatible receiver a data object.
|
||||
built-ins/Array/prototype/entries/returns-iterator-from-object.js # TypeError: Array.prototype.entries called on incompatible receiver a data object.
|
||||
built-ins/Array/prototype/every/15.4.4.16-1-10.js # TypeError: Array.prototype.every called on incompatible receiver a data object.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue