blob: 361b7fbd8eecaabc7556f41c907a675b57b490b6 [file] [log] [blame]
//@ skip if $model == "Apple Watch Series 3" # added by mark-jsc-stress-test.py
function foo(a, b) {
var c = (a + b) / 2;
var d = a - b;
for (var i = 0; i < 2; ++i) {
c *= d;
c += d;
c /= d;
}
return {a:c - d, b:d};
}
var result = 0;
var array = [7, 8];
for (var i = 0; i < 100000; ++i) {
var thingy = foo(5, 6);
result += thingy.a + array[2 + thingy.b];
}
if (result != 1650000) {
print("Bac result: " + result);
throw "Bad result: " + result;
}