[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: kdelibs/kjs
From: George Staikos <staikos () kde ! org>
Date: 2003-10-01 3:25:21
[Download RAW message or body]
CVS commit by staikos:
compile fixes for xlC
M +2 -0 function.h 1.43
M +12 -12 number_object.cpp 1.36
--- kdelibs/kjs/function.h #1.42:1.43
@@ -93,4 +93,6 @@ namespace KJS {
};
+ class ActivationImp;
+
class ArgumentsImp : public ObjectImp {
public:
--- kdelibs/kjs/number_object.cpp #1.35:1.36
@@ -190,9 +190,9 @@ Value NumberProtoFuncImp::call(ExecState
}
- if (x >= pow(10,21))
+ if (x >= pow(10.0,21))
return String(s+UString::from(x));
- double n = floor(x*pow(10,f));
- if (fabs(n/pow(10,f)-x) > fabs((n+1)/pow(10,f)-x))
+ double n = floor(x*pow(10.0,f));
+ if (fabs(n/pow(10.0,f)-x) > fabs((n+1)/pow(10.0,f)-x))
n++;
@@ -230,7 +230,7 @@ Value NumberProtoFuncImp::call(ExecState
if (!fractionDigits.isA(UndefinedType)) {
double logx = floor(log10(x));
- x /= pow(10,logx);
- double fx = floor(x*pow(10,f))/pow(10,f);
- double cx = ceil(x*pow(10,f))/pow(10,f);
+ x /= pow(10.0,logx);
+ double fx = floor(x*pow(10.0,f))/pow(10.0,f);
+ double cx = ceil(x*pow(10.0,f))/pow(10.0,f);
if (fabs(fx-x) < fabs(cx-x))
@@ -328,14 +328,14 @@ Value NumberProtoFuncImp::call(ExecState
if (x != 0) {
e = int(log10(x));
- double n = floor(x/pow(10,e-p+1));
- if (n < pow(10,p-1)) {
+ double n = floor(x/pow(10.0,e-p+1));
+ if (n < pow(10.0,p-1)) {
e = e - 1;
- n = floor(x/pow(10,e-p+1));
+ n = floor(x/pow(10.0,e-p+1));
}
- if (fabs((n+1)*pow(10,e-p+1)-x) < fabs(n*pow(10,e-p+1)-x))
+ if (fabs((n+1)*pow(10.0,e-p+1)-x) < fabs(n*pow(10.0,e-p+1)-x))
n++;
- assert(pow(10,p-1) <= n);
- assert(n < pow(10,p));
+ assert(pow(10.0,p-1) <= n);
+ assert(n < pow(10.0,p));
m = integer_part_noexp(n);
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic