From fb9fc7caab8a6dfdc9685fdeee0d9dd80fbc7a19 Mon Sep 17 00:00:00 2001 From: Alec Edgington Date: Fri, 12 Apr 2024 15:10:41 +0100 Subject: [PATCH] Modify specification of `trunc_u` and `trunc_s`. --- specification/hugr.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/specification/hugr.md b/specification/hugr.md index 4d99bfb21..662e5348c 100644 --- a/specification/hugr.md +++ b/specification/hugr.md @@ -1798,8 +1798,8 @@ Conversions between integers and floats: | Name | Inputs | Outputs | Meaning | | -------------- | --------- | ------------------------ | --------------------- | -| `trunc_u` | `float64` | `Sum(#(int), #(ErrorType))` | float to unsigned int. Returns an error when the float is non-finite or cannot be exactly stored in N bits. | -| `trunc_s` | `float64` | `Sum(#(int), #(ErrorType))` | float to signed int. Returns an error when the float is non-finite or cannot be exactly stored in N bits. | +| `trunc_u` | `float64` | `Sum(#(int), #(ErrorType))` | float to unsigned int, rounding towards zero. Returns an error when the float is non-finite. | +| `trunc_s` | `float64` | `Sum(#(int), #(ErrorType))` | float to signed int, rounding towards zero. Returns an error when the float is non-finite. | | `convert_u` | `int` | `float64` | unsigned int to float | | `convert_s` | `int` | `float64` | signed int to float |