Skip to content

Commit 91c38b4

Browse files
committed
fix issue 9717 - std.math.round rounds away from zero instead of to the nearest even integer
1 parent ef45b5e commit 91c38b4

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

std/math.d

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4158,8 +4158,8 @@ long lrint(real x) @trusted pure nothrow @nogc
41584158

41594159
/*******************************************
41604160
* Return the value of x rounded to the nearest integer.
4161-
* If the fractional part of x is exactly 0.5, the return value is rounded to
4162-
* the even integer.
4161+
* If the fractional part of x is exactly 0.5, the return value is
4162+
* rounded away from zero.
41634163
*/
41644164
real round(real x) @trusted nothrow @nogc
41654165
{

0 commit comments

Comments
 (0)