[Issue 9717] New: `std.math.round` rounds away from zero instead of to the nearest even integer

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Mar 14 05:16:13 PDT 2013


http://d.puremagic.com/issues/show_bug.cgi?id=9717

           Summary: `std.math.round` rounds away from zero instead of to
                    the nearest even integer
           Product: D
           Version: D2
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: major
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: verylonglogin.reg at gmail.com


--- Comment #0 from Denis Shelomovskij <verylonglogin.reg at gmail.com> 2013-03-14 15:16:12 MSK ---
Rounding to the nearest even integer is a default rounding mode and is an
expected, useful (e.g. for mesurements rounding), and documented behaviour for
`std.math.round`. But instead it currently rounds away from zero (it even uses
C's `roundl`).

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list