Debian Codegraph @

js/src/tests/test262/built-ins/Math/f16round/value-conversion.js

raw
1 // Copyright (C) 2024 Kevin Gibbons. All rights reserved.
2 // This code is governed by the BSD license found in the LICENSE file.
3
4 /*---
5 esid: sec-math.f16round
6 description: >
7 Convert to binary16 format and than to binary64 format
8 features: [Float16Array]
9 includes: [byteConversionValues.js]
10 ---*/
11
12 var values = byteConversionValues.values;
13 var expectedValues = byteConversionValues.expected.Float16;
14
15 values.forEach(function(value, i) {
16 var expected = expectedValues[i];
17
18 var result = Math.f16round(value);
19
20 assert.sameValue(
21 result,
22 expected,
23 "value: " + value
24 );
25 });
26
27 reportCompare(0, 0);