Skip to content

Commit

Permalink
Modify specification of trunc_u and trunc_s.
Browse files Browse the repository at this point in the history
  • Loading branch information
cqc-alec committed Apr 12, 2024
1 parent 75e75e8 commit fb9fc7c
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions specification/hugr.md
Original file line number Diff line number Diff line change
Expand Up @@ -1798,8 +1798,8 @@ Conversions between integers and floats:

| Name | Inputs | Outputs | Meaning |
| -------------- | --------- | ------------------------ | --------------------- |
| `trunc_u<N>` | `float64` | `Sum(#(int<N>), #(ErrorType))` | float to unsigned int. Returns an error when the float is non-finite or cannot be exactly stored in N bits. |
| `trunc_s<N>` | `float64` | `Sum(#(int<N>), #(ErrorType))` | float to signed int. Returns an error when the float is non-finite or cannot be exactly stored in N bits. |
| `trunc_u<N>` | `float64` | `Sum(#(int<N>), #(ErrorType))` | float to unsigned int, rounding towards zero. Returns an error when the float is non-finite. |
| `trunc_s<N>` | `float64` | `Sum(#(int<N>), #(ErrorType))` | float to signed int, rounding towards zero. Returns an error when the float is non-finite. |
| `convert_u<N>` | `int<N>` | `float64` | unsigned int to float |
| `convert_s<N>` | `int<N>` | `float64` | signed int to float |

Expand Down

0 comments on commit fb9fc7c

Please sign in to comment.