summaryrefslogtreecommitdiffstats
path: root/kjs/value.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'kjs/value.cpp')
-rw-r--r--kjs/value.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/kjs/value.cpp b/kjs/value.cpp
index bbf5a05c1..d5a7a9731 100644
--- a/kjs/value.cpp
+++ b/kjs/value.cpp
@@ -361,11 +361,12 @@ Number::Number(int i)
Number::Number(unsigned int u)
: Value(SimpleNumber::fits(u) ? SimpleNumber::make(u) : new NumberImp(static_cast<double>(u))) { }
-Number::Number(double d)
+// check for NaN first if we werent't compiled with -mieee on Alpha
#if defined(__alpha) && !defined(_IEEE_FP)
- // check for NaN first if we werent't compiled with -mieee on Alpha
+Number::Number(double d)
: Value(KJS::isNaN(d) ? NumberImp::staticNaN : (SimpleNumber::fits(d) ? SimpleNumber::make((long)d) : new NumberImp(d))) { }
#else
+Number::Number(double d)
: Value(SimpleNumber::fits(d) ? SimpleNumber::make((long)d) : (KJS::isNaN(d) ? NumberImp::staticNaN : new NumberImp(d))) { }
#endif