aboutsummaryrefslogtreecommitdiff
path: root/gl/floor.c
diff options
context:
space:
mode:
authorGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2010-04-07 21:11:46 -0400
committerGravatar Thomas Guyot-Sionnest <dermoth@aei.ca> 2010-04-12 21:26:35 -0400
commit74da141e618ef99959d509cb2e7be35a348a39db (patch)
tree88ebc38b381a1021fc2d74864a71e230ae591c3d /gl/floor.c
parentc63a4f726a0b6ad8cf6040f947754a81fd4683bb (diff)
downloadmonitoring-plugins-74da141e618ef99959d509cb2e7be35a348a39db.tar.gz
Sync with the latest Gnulib code (177f525)
Signed-off-by: Thomas Guyot-Sionnest <dermoth@aei.ca>
Diffstat (limited to 'gl/floor.c')
-rw-r--r--gl/floor.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/gl/floor.c b/gl/floor.c
index 05a6591a..593b5268 100644
--- a/gl/floor.c
+++ b/gl/floor.c
@@ -1,5 +1,5 @@
/* Round towards negative infinity.
- Copyright (C) 2007 Free Software Foundation, Inc.
+ Copyright (C) 2007, 2009, 2010 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
@@ -67,27 +67,27 @@ FUNC (DOUBLE x)
{
/* Avoid rounding errors for values near 2^k, where k >= MANT_DIG-1. */
if (z < TWO_MANT_DIG)
- {
- /* Round to the next integer (nearest or up or down, doesn't matter). */
- z += TWO_MANT_DIG;
- z -= TWO_MANT_DIG;
- /* Enforce rounding down. */
- if (z > y)
- z -= L_(1.0);
- }
+ {
+ /* Round to the next integer (nearest or up or down, doesn't matter). */
+ z += TWO_MANT_DIG;
+ z -= TWO_MANT_DIG;
+ /* Enforce rounding down. */
+ if (z > y)
+ z -= L_(1.0);
+ }
}
else if (z < L_(0.0))
{
/* Avoid rounding errors for values near -2^k, where k >= MANT_DIG-1. */
if (z > - TWO_MANT_DIG)
- {
- /* Round to the next integer (nearest or up or down, doesn't matter). */
- z -= TWO_MANT_DIG;
- z += TWO_MANT_DIG;
- /* Enforce rounding down. */
- if (z > y)
- z -= L_(1.0);
- }
+ {
+ /* Round to the next integer (nearest or up or down, doesn't matter). */
+ z -= TWO_MANT_DIG;
+ z += TWO_MANT_DIG;
+ /* Enforce rounding down. */
+ if (z > y)
+ z -= L_(1.0);
+ }
}
return z;
}