diff options
author | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-12 16:18:45 +0000 |
---|---|---|
committer | usa <usa@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-12-12 16:18:45 +0000 |
commit | 95cf0d17494b6a79bea4bdb1a565a4484a6c71b8 (patch) | |
tree | 5a5d17fdc21a99a9162478e5961bd15b8b0a8ddd /numeric.c | |
parent | 22c5061ebeb362894bb9cd1be41e6a53d3286908 (diff) | |
download | ruby-95cf0d17494b6a79bea4bdb1a565a4484a6c71b8.tar.gz |
get rid of a test failure with VC10.
* numeric.c (round_half_up, round_half_down): use `round` always because it's
defined in this file even if doesn't exist.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57068 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'numeric.c')
-rw-r--r-- | numeric.c | 16 |
1 files changed, 0 insertions, 16 deletions
@@ -97,21 +97,13 @@ round_half_up(double x, double s) { double f, xs = x * s; -#ifdef HAVE_ROUND f = round(xs); if (s == 1.0) return f; -#endif if (x > 0) { -#ifndef HAVE_ROUND - f = floor(xs); -#endif if ((double)((f + 0.5) / s) <= x) f += 1; x = f; } else { -#ifndef HAVE_ROUND - f = ceil(xs); -#endif if ((double)((f - 0.5) / s) >= x) f -= 1; x = f; } @@ -123,20 +115,12 @@ round_half_down(double x, double s) { double f, xs = x * s; -#ifdef HAVE_ROUND f = round(xs); -#endif if (x > 0) { -#ifndef HAVE_ROUND - f = ceil(xs); -#endif if ((double)((f - 0.5) / s) >= x) f -= 1; x = f; } else { -#ifndef HAVE_ROUND - f = floor(xs); -#endif if ((double)((f + 0.5) / s) <= x) f += 1; x = f; } |