about summary refs log tree commit diff
path: root/tests/codegen/patchable-function-entry/patchable-function-entry-one-flag.rs
diff options
context:
space:
mode:
authorTrevor Gross <tmgross@umich.edu>2025-02-11 00:17:32 +0000
committerTrevor Gross <t.gross35@gmail.com>2025-02-11 00:55:22 -0600
commit53a055049cde50f6a42cf3cb5a7826142ea396e0 (patch)
tree8a9784a01807ff70902c343b421331cced86a94e /tests/codegen/patchable-function-entry/patchable-function-entry-one-flag.rs
parent2a3ef8b9a2365365aae80419a9bbac0bddf64c71 (diff)
downloadrust-53a055049cde50f6a42cf3cb5a7826142ea396e0.tar.gz
rust-53a055049cde50f6a42cf3cb5a7826142ea396e0.zip
Add `roundeven{,f,f16,f128}`
C23 specifies a new set of `roundeven` functions that round to the
nearest integral, with ties to even. It does not raise any floating
point exceptions.

This behavior is similar to two other functions:

1. `rint`, which rounds to the nearest integer respecting rounding mode
   and possibly raising exceptions.
2. `nearbyint`, which is identical to `rint` except it may not raise
   exceptions.

Technically `rint`, `nearbyint`, and `roundeven` all behave the same in
Rust because we assume default floating point environment. The backends
are allowed to lower to `roundeven`, however, so we should provide it in
case the fallback is needed.

Add the `roundeven` family here and convert `rint` to a function that
takes a rounding mode. This currently has no effect.
Diffstat (limited to 'tests/codegen/patchable-function-entry/patchable-function-entry-one-flag.rs')
0 files changed, 0 insertions, 0 deletions