OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "../include/v8stdint.h" | 5 #include "include/v8stdint.h" |
6 #include "checks.h" | 6 #include "src/checks.h" |
7 #include "utils.h" | 7 #include "src/utils.h" |
8 | 8 |
9 #include "fast-dtoa.h" | 9 #include "src/fast-dtoa.h" |
10 | 10 |
11 #include "cached-powers.h" | 11 #include "src/cached-powers.h" |
12 #include "diy-fp.h" | 12 #include "src/diy-fp.h" |
13 #include "double.h" | 13 #include "src/double.h" |
14 | 14 |
15 namespace v8 { | 15 namespace v8 { |
16 namespace internal { | 16 namespace internal { |
17 | 17 |
18 // The minimal and maximal target exponent define the range of w's binary | 18 // The minimal and maximal target exponent define the range of w's binary |
19 // exponent, where 'w' is the result of multiplying the input by a cached power | 19 // exponent, where 'w' is the result of multiplying the input by a cached power |
20 // of ten. | 20 // of ten. |
21 // | 21 // |
22 // A different range might be chosen on a different platform, to optimize digit | 22 // A different range might be chosen on a different platform, to optimize digit |
23 // generation, but a smaller range requires more powers of ten to be cached. | 23 // generation, but a smaller range requires more powers of ten to be cached. |
(...skipping 682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
706 UNREACHABLE(); | 706 UNREACHABLE(); |
707 } | 707 } |
708 if (result) { | 708 if (result) { |
709 *decimal_point = *length + decimal_exponent; | 709 *decimal_point = *length + decimal_exponent; |
710 buffer[*length] = '\0'; | 710 buffer[*length] = '\0'; |
711 } | 711 } |
712 return result; | 712 return result; |
713 } | 713 } |
714 | 714 |
715 } } // namespace v8::internal | 715 } } // namespace v8::internal |
OLD | NEW |