namespace internal {
-double ceiling(double x) {
- return ceil(x);
-}
-
-
static Mutex* limit_mutex = NULL;
namespace internal {
-double ceiling(double x) {
- // Correct as on OS X
- if (-1.0 < x && x < 0.0) {
- return -0.0;
- } else {
- return ceil(x);
- }
-}
-
-
static Mutex* limit_mutex = NULL;
namespace internal {
-double ceiling(double x) {
- return ceil(x);
-}
-
-
static Mutex* limit_mutex = NULL;
namespace internal {
-double ceiling(double x) {
- // Correct Mac OS X Leopard 'ceil' behavior.
- if (-1.0 < x && x < 0.0) {
- return -0.0;
- } else {
- return ceil(x);
- }
-}
-
-
static Mutex* limit_mutex = NULL;
namespace internal {
-double ceiling(double x) {
- return ceil(x);
-}
-
-
static Mutex* limit_mutex = NULL;
// ----------------------------------------------------------------------------
// Math functions
+double ceiling(double x) {
+ // Correct buggy 'ceil' on some systems (i.e. FreeBSD, OS X 10.5)
+ return (-1.0 < x && x < 0.0) ? -0.0 : ceil(x);
+}
+
+
double modulo(double x, double y) {
return fmod(x, y);
}
namespace internal {
-double ceiling(double x) {
- return ceil(x);
-}
-
-
static Mutex* limit_mutex = NULL;