tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

value-conversion.js (613B)


      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);