Sat, 03 Jan 2015 20:18:00 +0100
Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.
1 assertNear(Math.expm1(1e-300), 1e-300);
2 assertNear(Math.expm1(1e-100), 1e-100);
3 assertNear(Math.expm1(1e-14), 1.000000000000005e-14);
4 assertNear(Math.expm1(1e-6), 0.0000010000005000001665);
6 var expm1_data = [
7 [ -1.875817529344e-70, -1.875817529344e-70 ],
8 [ -7.09962844069878e-15, -7.099628440698755e-15 ],
9 [ -2.114990849122478e-10, -2.1149908488988187e-10 ],
10 [ -0.0000031404608812881633, -0.000003140455950046052 ],
12 [ 1.875817529344e-70, 1.875817529344e-70 ],
13 [ 6.261923313140869e-30, 6.261923313140869e-30 ],
14 [ 7.09962844069878e-15, 7.099628440698805e-15 ],
15 [ 1.3671879628418538e-12, 1.3671879628427884e-12 ],
16 [ 2.114990849122478e-10, 2.1149908493461373e-10 ],
17 [ 1.6900931765206906e-8, 1.6900931908027652e-8 ],
18 [ 0.0000031404608812881633, 0.0000031404658125405988 ]
19 ];
21 for (var [x, y] of expm1_data)
22 assertNear(Math.expm1(x), y);
24 reportCompare(0, 0, "ok");