Skip to content

StdFloat::round incorrectly states ties round toward zero #499

Description

@Mukundan314

The documentation for StdFloat::round indicates that ties (halfway cases) should round toward zero. However, the observed behavior contradicts this; ties are currently rounded away from zero.

Example code to reproduce:

#![feature(portable_simd)]
use std::simd::prelude::*;
use std::simd::StdFloat;

fn main() {
    println!("{:?}", Simd::from_array([1.5]).round());
}

Output:

[2.0]

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    C-bugCategory: Bug

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions