42 using namespace v8::internal;
46 static void TrimRepresentation(
Vector<char> representation) {
49 for (i = len - 1; i >= 0; --i) {
50 if (representation[i] !=
'0')
break;
52 representation[i + 1] =
'\0';
56 static const int kBufferSize = 100;
60 char buffer_container[kBufferSize];
86 TrimRepresentation(buffer);
92 TrimRepresentation(buffer);
102 TrimRepresentation(buffer);
108 TrimRepresentation(buffer);
112 double min_double = 5e-324;
119 TrimRepresentation(buffer);
125 TrimRepresentation(buffer);
129 double max_double = 1.7976931348623157e308;
136 TrimRepresentation(buffer);
146 TrimRepresentation(buffer);
152 buffer, &sign, &length, &point);
154 TrimRepresentation(buffer);
159 buffer, &sign, &length, &point);
164 buffer, &sign, &length, &point);
166 TrimRepresentation(buffer);
171 buffer, &sign, &length, &point);
176 buffer, &sign, &length, &point);
178 TrimRepresentation(buffer);
183 buffer, &sign, &length, &point);
191 TrimRepresentation(buffer);
197 buffer, &sign, &length, &point);
199 TrimRepresentation(buffer);
205 buffer, &sign, &length, &point);
211 buffer, &sign, &length, &point);
214 TrimRepresentation(buffer);
226 TrimRepresentation(buffer);
238 TrimRepresentation(buffer);
243 buffer, &sign, &length, &point);
248 v = -3.9292015898194142585311918e-10;
255 TrimRepresentation(buffer);
258 v = 3.3161339052167390562200598e-237;
261 TrimRepresentation(buffer);
268 char buffer_container[kBufferSize];
276 for (
int i = 0; i < precomputed.
length(); ++i) {
278 double v = current_test.
v;
288 char buffer_container[kBufferSize];
296 for (
int i = 0; i < precomputed.
length(); ++i) {
298 double v = current_test.
v;
303 CHECK_GE(number_digits, length - point);
304 TrimRepresentation(buffer);
311 char buffer_container[kBufferSize];
319 for (
int i = 0; i < precomputed.
length(); ++i) {
321 double v = current_test.
v;
324 buffer, &sign, &length, &point);
328 TrimRepresentation(buffer);
#define CHECK_EQ(expected, value)
Vector< const PrecomputedShortest > PrecomputedShortestRepresentations()
Vector< const PrecomputedPrecision > PrecomputedPrecisionRepresentations()
const char * representation
Vector< const PrecomputedFixed > PrecomputedFixedRepresentations()
const char * representation
const char * representation
#define V8_2PART_UINT64_C(a, b)
int StrLength(const char *string)
void DoubleToAscii(double v, DtoaMode mode, int requested_digits, Vector< char > buffer, int *sign, int *length, int *point)