var print = typeof print !== "undefined" ? print : console.log;
try {
var f16 = new Float16Array(2);
f16[0] = 1.5;
if (f16[0] !== 1.5) throw "bad Float16Array value";
var buf = new ArrayBuffer(4);
var dv = new DataView(buf);
dv.setFloat16(0, 1.5, true);
if (dv.getFloat16(0, true) !== 1.5) throw "bad DataView float16";
if (typeof Math.f16round !== "function") throw "no Math.f16round";
if (Math.f16round(1.337890625) !== 1.3378906249999998) {
if (typeof Math.f16round(1.5) !== "number") throw "f16round not returning number";
}
print("OK");
} catch (e) {
print("NO: " + e);
}