Skip to content

Commit

Permalink
Fix incorrect rounding behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
xoviat authored and isuruf committed Jan 1, 2018
1 parent 90c6470 commit 12859cf
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 6 deletions.
5 changes: 2 additions & 3 deletions runtime/flangrti/around.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
*/

#include "mthdecls.h"

extern float roundf(float);
#include <math.h>

float
__mth_i_around(float x)
{
return roundf(x);
return rintf(x);
}
5 changes: 2 additions & 3 deletions runtime/flangrti/dround.c
Original file line number Diff line number Diff line change
Expand Up @@ -16,11 +16,10 @@
*/

#include "mthdecls.h"

extern double round(double);
#include <math.h>

double
__mth_i_dround(double x)
{
return round(x);
return rint(x);
}

0 comments on commit 12859cf

Please sign in to comment.