From 187873922a3d89bb22c82141d99c3e474b1f9b19 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Fri, 6 Dec 2024 13:05:38 -0800 Subject: [PATCH] [js-api] Update references to IEEE 754-2008. (#1852) Update them to refer to IEEE 754-2019. I've confirmed that the relevant section names and numbers in 754-2019 are the same. --- document/js-api/index.bs | 2 +- test/core/float_exprs.wast | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/document/js-api/index.bs b/document/js-api/index.bs index f89c1f4d60..c00cadeedc 100644 --- a/document/js-api/index.bs +++ b/document/js-api/index.bs @@ -1213,7 +1213,7 @@ The algorithm ToWebAssemblyValue(|v|, |type|) coerces a JavaScript va 1. Let |n| be an implementation-defined integer such that [=canon=]32 ≤ |n| < 2[=signif=](32). 1. Let |f32| be [=nan=](n). 1. Otherwise, - 1. Let |f32| be |number| rounded to the nearest representable value using IEEE 754-2008 round to nearest, ties to even mode. [[IEEE-754]] + 1. Let |f32| be |number| rounded to the nearest representable value using IEEE 754-2019 round to nearest, ties to even mode. [[IEEE-754]] 1. Return [=f32.const=] |f32|. 1. If |type| is [=f64=], 1. Let |number| be [=?=] [$ToNumber$](|v|). diff --git a/test/core/float_exprs.wast b/test/core/float_exprs.wast index 274c996652..114cc99c7a 100644 --- a/test/core/float_exprs.wast +++ b/test/core/float_exprs.wast @@ -35,7 +35,7 @@ (assert_return (invoke "f64.no_fma" (f64.const 0x1.7e2c44058a799p+52) (f64.const 0x1.c73b71765b8b2p+685) (f64.const -0x1.16c641df0b108p+690)) (f64.const 0x1.53ccb53de0bd1p+738)) ;; Test that x+0.0 is not folded to x. -;; See IEEE 754-2008 10.4 "Literal meaning and value-changing optimizations". +;; See IEEE 754-2019 10.4 "Literal meaning and value-changing optimizations". (module (func (export "f32.no_fold_add_zero") (param $x f32) (result f32) @@ -94,7 +94,7 @@ (assert_return (invoke "f64.no_fold_mul_zero" (f64.const nan:0x4000000000000)) (f64.const nan:arithmetic)) ;; Test that x*1.0 is not folded to x. -;; See IEEE 754-2008 10.4 "Literal meaning and value-changing optimizations". +;; See IEEE 754-2019 10.4 "Literal meaning and value-changing optimizations". (module (func (export "f32.no_fold_mul_one") (param $x f32) (result f32)