diff options
author | Ryan Dahl <ry@tinyclouds.org> | 2011-07-08 16:40:11 -0700 |
---|---|---|
committer | Ryan Dahl <ry@tinyclouds.org> | 2011-07-08 16:40:11 -0700 |
commit | e5564a3f29e0a818832a97c7c3b28d7c8b3b0460 (patch) | |
tree | 4b48a6577080d5e44da4d2cbebb7fe7951660de8 /deps/v8/src/cached-powers.cc | |
parent | 0df2f74d364826053641395b01c2fcb1345057a9 (diff) | |
download | node-new-e5564a3f29e0a818832a97c7c3b28d7c8b3b0460.tar.gz |
Upgrade V8 to 3.4.10
Diffstat (limited to 'deps/v8/src/cached-powers.cc')
-rw-r--r-- | deps/v8/src/cached-powers.cc | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/deps/v8/src/cached-powers.cc b/deps/v8/src/cached-powers.cc index 43dbc7855e..30a67a661b 100644 --- a/deps/v8/src/cached-powers.cc +++ b/deps/v8/src/cached-powers.cc @@ -1,4 +1,4 @@ -// Copyright 2006-2008 the V8 project authors. All rights reserved. +// Copyright 2011 the V8 project authors. All rights reserved. // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are // met: @@ -26,10 +26,12 @@ // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. #include <stdarg.h> +#include <math.h> #include <limits.h> -#include "v8.h" - +#include "../include/v8stdint.h" +#include "globals.h" +#include "checks.h" #include "cached-powers.h" namespace v8 { @@ -147,7 +149,9 @@ void PowersOfTenCache::GetCachedPowerForBinaryExponentRange( DiyFp* power, int* decimal_exponent) { int kQ = DiyFp::kSignificandSize; - double k = ceiling((min_exponent + kQ - 1) * kD_1_LOG2_10); + // Some platforms return incorrect sign on 0 result. We can ignore that here, + // which means we can avoid depending on platform.h. + double k = ceil((min_exponent + kQ - 1) * kD_1_LOG2_10); int foo = kCachedPowersOffset; int index = (foo + static_cast<int>(k) - 1) / kDecimalExponentDistance + 1; |