FIX::double_conversion Namespace Reference

Classes

class  Bignum
class  DiyFp
class  Double
class  Single
class  PowersOfTenCache
struct  CachedPower

Enumerations

enum  BignumDtoaMode { BIGNUM_DTOA_SHORTEST , BIGNUM_DTOA_SHORTEST_SINGLE , BIGNUM_DTOA_FIXED , BIGNUM_DTOA_PRECISION }
enum  FastDtoaMode { FAST_DTOA_SHORTEST , FAST_DTOA_SHORTEST_SINGLE , FAST_DTOA_PRECISION }

Functions

template<typename S>
static int BitSize (S value)
static uint64_t ReadUInt64 (Vector< const char > buffer, int from, int digits_to_read)
static int HexCharValue (char c)
template<typename S>
static int SizeInHexChars (S number)
static char HexCharOfValue (int value)
void BignumDtoa (double v, BignumDtoaMode mode, int requested_digits, Vector< char > buffer, int *length, int *point)
static uint64_t double_to_uint64 (double d)
static double uint64_to_double (uint64_t d64)
static uint32_t float_to_uint32 (float f)
static float uint32_to_float (uint32_t d32)
static int NormalizedExponent (uint64_t significand, int exponent)
static int EstimatePower (int exponent)
static void InitialScaledStartValues (uint64_t significand, int exponent, bool lower_boundary_is_closer, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
static void FixupMultiply10 (int estimated_power, bool is_even, int *decimal_point, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
static void GenerateShortestDigits (Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus, bool is_even, Vector< char > buffer, int *length)
static void BignumToFixed (int requested_digits, int *decimal_point, Bignum *numerator, Bignum *denominator, Vector< char >(buffer), int *length)
static void GenerateCountedDigits (int count, int *decimal_point, Bignum *numerator, Bignum *denominator, Vector< char >(buffer), int *length)
static void GenerateCountedDigits (int count, int *decimal_point, Bignum *numerator, Bignum *denominator, Vector< char > buffer, int *length)
static void InitialScaledStartValuesPositiveExponent (uint64_t significand, int exponent, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
static void InitialScaledStartValuesNegativeExponentPositivePower (uint64_t significand, int exponent, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
static void InitialScaledStartValuesNegativeExponentNegativePower (uint64_t significand, int exponent, int estimated_power, bool need_boundary_deltas, Bignum *numerator, Bignum *denominator, Bignum *delta_minus, Bignum *delta_plus)
bool FastDtoa (double d, FastDtoaMode mode, int requested_digits, Vector< char > buffer, int *length, int *decimal_point)
static bool RoundWeed (Vector< char > buffer, int length, uint64_t distance_too_high_w, uint64_t unsafe_interval, uint64_t rest, uint64_t ten_kappa, uint64_t unit)
static bool RoundWeedCounted (Vector< char > buffer, int length, uint64_t rest, uint64_t ten_kappa, uint64_t unit, int *kappa)
static void BiggestPowerTen (uint32_t number, int number_bits, uint32_t *power, int *exponent_plus_one)
static bool DigitGen (DiyFp low, DiyFp w, DiyFp high, Vector< char > buffer, int *length, int *kappa)
static bool DigitGenCounted (DiyFp w, int requested_digits, Vector< char > buffer, int *length, int *kappa)
static bool Grisu3 (double v, FastDtoaMode mode, Vector< char > buffer, int *length, int *decimal_exponent)
static bool Grisu3Counted (double v, int requested_digits, Vector< char > buffer, int *length, int *decimal_exponent)
double Strtod (Vector< const char > buffer, int exponent)
float Strtof (Vector< const char > buffer, int exponent)
static Vector< const char > TrimLeadingZeros (Vector< const char > buffer)
static Vector< const char > TrimTrailingZeros (Vector< const char > buffer)
static void CutToMaxSignificantDigits (Vector< const char > buffer, int exponent, char *significant_buffer, int *significant_exponent)
static void TrimAndCut (Vector< const char > buffer, int exponent, char *buffer_copy_space, int space_size, Vector< const char > *trimmed, int *updated_exponent)
static uint64_t ReadUint64 (Vector< const char > buffer, int *number_of_read_digits)
static void ReadDiyFp (Vector< const char > buffer, DiyFp *result, int *remaining_decimals)
static bool DoubleStrtod (Vector< const char > trimmed, int exponent, double *result)
static DiyFp AdjustmentPowerOfTen (int exponent)
static bool DiyFpStrtod (Vector< const char > buffer, int exponent, double *result)
static int CompareBufferWithDiyFp (Vector< const char > buffer, int exponent, DiyFp diy_fp)
static bool ComputeGuess (Vector< const char > trimmed, int exponent, double *guess)
static BignumDtoaMode DtoaToBignumDtoaMode (DoubleToStringConverter::DtoaMode dtoa_mode)
template<class Iterator>
static bool ConsumeSubString (Iterator *current, Iterator end, const char *substring)
static bool isWhitespace (int x)
template<class Iterator>
static bool AdvanceToNonspace (Iterator *current, Iterator end)
static bool isDigit (int x, int radix)
static double SignedZero (bool sign)
static bool IsDecimalDigitForRadix (int c, int radix)
static bool IsCharacterDigitForRadix (int c, int radix, char a_character)
template<int radix_log_2, class Iterator>
static double RadixStringToIeee (Iterator *current, Iterator end, bool sign, bool allow_trailing_junk, double junk_string_value, bool read_as_double, bool *result_is_junk)

Variables

static const CachedPower kCachedPowers []
static const int kCachedPowersLength = ARRAY_SIZE(kCachedPowers)
static const int kCachedPowersOffset = 348
static const double kD_1_LOG2_10 = 0.30102999566398114
static const int kFastDtoaMaximalLength = 17
static const int kFastDtoaMaximalSingleLength = 9
static const int kMinimalTargetExponent = -60
static const int kMaximalTargetExponent = -32
static unsigned int const kSmallPowersOfTen []
static const int kMaxExactDoubleIntegerDecimalDigits = 15
static const int kMaxUint64DecimalDigits = 19
static const int kMaxDecimalPower = 309
static const int kMinDecimalPower = -324
static const uint64_t kMaxUint64 = UINT64_2PART_C(0xFFFFFFFF, FFFFFFFF)
static const double exact_powers_of_ten []
static const int kExactPowersOfTenSize = ARRAY_SIZE(exact_powers_of_ten)
static const int kMaxSignificantDecimalDigits = 780
const int kMaxSignificantDigits = 772
static const char kWhitespaceTable7 [] = { 32, 13, 10, 9, 11, 12 }
static const int kWhitespaceTable7Length = ARRAY_SIZE(kWhitespaceTable7)
static const uc16 kWhitespaceTable16 []
static const int kWhitespaceTable16Length = ARRAY_SIZE(kWhitespaceTable16)

Enumeration Type Documentation

◆ BignumDtoaMode

Enumerator
BIGNUM_DTOA_SHORTEST 
BIGNUM_DTOA_SHORTEST_SINGLE 
BIGNUM_DTOA_FIXED 
BIGNUM_DTOA_PRECISION 

Definition at line 36 of file FieldConvertors.cpp.

◆ FastDtoaMode

Enumerator
FAST_DTOA_SHORTEST 
FAST_DTOA_SHORTEST_SINGLE 
FAST_DTOA_PRECISION 

Definition at line 36 of file FieldConvertors.cpp.

Function Documentation

◆ AdjustmentPowerOfTen()

DiyFp FIX::double_conversion::AdjustmentPowerOfTen ( int exponent)
static

Definition at line 251 of file FieldConvertors.cpp.

281{
282
283// we include "double-conversion" project in FIX namespace
284// to avoid linking errors if quickfix is linked statically
285// and "double-conversion" is already used by target project
286
287#include "double-conversion/diy-fp.cc"
288#include "double-conversion/fixed-dtoa.cc"
289#include "double-conversion/bignum.cc"
290#include "double-conversion/bignum-dtoa.cc"
291#include "double-conversion/cached-powers.cc"
292#include "double-conversion/fast-dtoa.cc"
293#include "double-conversion/strtod.cc"
294#include "double-conversion/double-conversion.cc"
295
296 static double_conversion::DoubleToStringConverter g_dtoa_converter(
297 double_conversion::DoubleToStringConverter::NO_FLAGS,
298 "INF",
299 "NAN",
300 'e',
304 0);
305
306 static double_conversion::StringToDoubleConverter g_atod_converter(
307 double_conversion::StringToDoubleConverter::NO_FLAGS,
308 std::numeric_limits<double>::quiet_NaN(),
309 std::numeric_limits<double>::quiet_NaN(),
310 "INF",
311 "NAN");
312
313 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
314 {
315 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
316 }
317
318 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
319 {
320 double_conversion::StringBuilder builder( buffer, size );
321 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
322 {
323 builder.Reset();
324 return 0;
325 }
326
327 builder.TrimTrailingZeros();
328 return builder.position();
329 }
330
331 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
332 {
333 double_conversion::StringBuilder builder( buffer, size );
334 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
335 {
336 builder.Reset();
337 return 0;
338 }
339
340 return builder.position();
341 }
342
343}
static double_conversion::StringToDoubleConverter g_atod_converter(double_conversion::StringToDoubleConverter::NO_FLAGS, std::numeric_limits< double >::quiet_NaN(), std::numeric_limits< double >::quiet_NaN(), "INF", "NAN")
static double_conversion::DoubleToStringConverter g_dtoa_converter(double_conversion::DoubleToStringConverter::NO_FLAGS, "INF", "NAN", 'e', -DoubleConvertor::SIGNIFICANT_DIGITS, DoubleConvertor::SIGNIFICANT_DIGITS, DoubleConvertor::SIGNIFICANT_DIGITS - 1, 0)
static int fast_fixed_dtoa(char *buffer, int size, double value)
static double fast_strtod(const char *buffer, int size, int *processed_chars)
static int fast_dtoa(char *buffer, int size, double value)
static const int SIGNIFICANT_DIGITS

◆ AdvanceToNonspace()

template<class Iterator>
bool FIX::double_conversion::AdvanceToNonspace ( Iterator * current,
Iterator end )
inlinestatic

Definition at line 476 of file FieldConvertors.cpp.

506{
507
508// we include "double-conversion" project in FIX namespace
509// to avoid linking errors if quickfix is linked statically
510// and "double-conversion" is already used by target project
511
512#include "double-conversion/diy-fp.cc"
513#include "double-conversion/fixed-dtoa.cc"
514#include "double-conversion/bignum.cc"
515#include "double-conversion/bignum-dtoa.cc"
516#include "double-conversion/cached-powers.cc"
517#include "double-conversion/fast-dtoa.cc"
518#include "double-conversion/strtod.cc"
519#include "double-conversion/double-conversion.cc"
520
521 static double_conversion::DoubleToStringConverter g_dtoa_converter(
522 double_conversion::DoubleToStringConverter::NO_FLAGS,
523 "INF",
524 "NAN",
525 'e',
529 0);
530
531 static double_conversion::StringToDoubleConverter g_atod_converter(
532 double_conversion::StringToDoubleConverter::NO_FLAGS,
533 std::numeric_limits<double>::quiet_NaN(),
534 std::numeric_limits<double>::quiet_NaN(),
535 "INF",
536 "NAN");
537
538 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
539 {
540 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
541 }
542
543 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
544 {
545 double_conversion::StringBuilder builder( buffer, size );
546 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
547 {
548 builder.Reset();
549 return 0;
550 }
551
552 builder.TrimTrailingZeros();
553 return builder.position();
554 }
555
556 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
557 {
558 double_conversion::StringBuilder builder( buffer, size );
559 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
560 {
561 builder.Reset();
562 return 0;
563 }
564
565 return builder.position();
566 }
567
568}

◆ BiggestPowerTen()

void FIX::double_conversion::BiggestPowerTen ( uint32_t number,
int number_bits,
uint32_t * power,
int * exponent_plus_one )
static

Definition at line 240 of file FieldConvertors.cpp.

270{
271
272// we include "double-conversion" project in FIX namespace
273// to avoid linking errors if quickfix is linked statically
274// and "double-conversion" is already used by target project
275
276#include "double-conversion/diy-fp.cc"
277#include "double-conversion/fixed-dtoa.cc"
278#include "double-conversion/bignum.cc"
279#include "double-conversion/bignum-dtoa.cc"
280#include "double-conversion/cached-powers.cc"
281#include "double-conversion/fast-dtoa.cc"
282#include "double-conversion/strtod.cc"
283#include "double-conversion/double-conversion.cc"
284
285 static double_conversion::DoubleToStringConverter g_dtoa_converter(
286 double_conversion::DoubleToStringConverter::NO_FLAGS,
287 "INF",
288 "NAN",
289 'e',
293 0);
294
295 static double_conversion::StringToDoubleConverter g_atod_converter(
296 double_conversion::StringToDoubleConverter::NO_FLAGS,
297 std::numeric_limits<double>::quiet_NaN(),
298 std::numeric_limits<double>::quiet_NaN(),
299 "INF",
300 "NAN");
301
302 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
303 {
304 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
305 }
306
307 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
308 {
309 double_conversion::StringBuilder builder( buffer, size );
310 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
311 {
312 builder.Reset();
313 return 0;
314 }
315
316 builder.TrimTrailingZeros();
317 return builder.position();
318 }
319
320 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
321 {
322 double_conversion::StringBuilder builder( buffer, size );
323 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
324 {
325 builder.Reset();
326 return 0;
327 }
328
329 return builder.position();
330 }
331
332}

◆ BignumDtoa()

void FIX::double_conversion::BignumDtoa ( double v,
BignumDtoaMode mode,
int requested_digits,
Vector< char > buffer,
int * length,
int * point )

Definition at line 89 of file FieldConvertors.cpp.

◆ BignumToFixed()

void FIX::double_conversion::BignumToFixed ( int requested_digits,
int * decimal_point,
Bignum * numerator,
Bignum * denominator,
Vector< char > buffer,
int * length )
static

Definition at line 326 of file FieldConvertors.cpp.

356{
357
358// we include "double-conversion" project in FIX namespace
359// to avoid linking errors if quickfix is linked statically
360// and "double-conversion" is already used by target project
361
362#include "double-conversion/diy-fp.cc"
363#include "double-conversion/fixed-dtoa.cc"
364#include "double-conversion/bignum.cc"
365#include "double-conversion/bignum-dtoa.cc"
366#include "double-conversion/cached-powers.cc"
367#include "double-conversion/fast-dtoa.cc"
368#include "double-conversion/strtod.cc"
369#include "double-conversion/double-conversion.cc"
370
371 static double_conversion::DoubleToStringConverter g_dtoa_converter(
372 double_conversion::DoubleToStringConverter::NO_FLAGS,
373 "INF",
374 "NAN",
375 'e',
379 0);
380
381 static double_conversion::StringToDoubleConverter g_atod_converter(
382 double_conversion::StringToDoubleConverter::NO_FLAGS,
383 std::numeric_limits<double>::quiet_NaN(),
384 std::numeric_limits<double>::quiet_NaN(),
385 "INF",
386 "NAN");
387
388 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
389 {
390 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
391 }
392
393 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
394 {
395 double_conversion::StringBuilder builder( buffer, size );
396 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
397 {
398 builder.Reset();
399 return 0;
400 }
401
402 builder.TrimTrailingZeros();
403 return builder.position();
404 }
405
406 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
407 {
408 double_conversion::StringBuilder builder( buffer, size );
409 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
410 {
411 builder.Reset();
412 return 0;
413 }
414
415 return builder.position();
416 }
417
418}

◆ BitSize()

template<typename S>
int FIX::double_conversion::BitSize ( S value)
static

Definition at line 43 of file FieldConvertors.cpp.

◆ CompareBufferWithDiyFp()

int FIX::double_conversion::CompareBufferWithDiyFp ( Vector< const char > buffer,
int exponent,
DiyFp diy_fp )
static

Definition at line 394 of file FieldConvertors.cpp.

424{
425
426// we include "double-conversion" project in FIX namespace
427// to avoid linking errors if quickfix is linked statically
428// and "double-conversion" is already used by target project
429
430#include "double-conversion/diy-fp.cc"
431#include "double-conversion/fixed-dtoa.cc"
432#include "double-conversion/bignum.cc"
433#include "double-conversion/bignum-dtoa.cc"
434#include "double-conversion/cached-powers.cc"
435#include "double-conversion/fast-dtoa.cc"
436#include "double-conversion/strtod.cc"
437#include "double-conversion/double-conversion.cc"
438
439 static double_conversion::DoubleToStringConverter g_dtoa_converter(
440 double_conversion::DoubleToStringConverter::NO_FLAGS,
441 "INF",
442 "NAN",
443 'e',
447 0);
448
449 static double_conversion::StringToDoubleConverter g_atod_converter(
450 double_conversion::StringToDoubleConverter::NO_FLAGS,
451 std::numeric_limits<double>::quiet_NaN(),
452 std::numeric_limits<double>::quiet_NaN(),
453 "INF",
454 "NAN");
455
456 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
457 {
458 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
459 }
460
461 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
462 {
463 double_conversion::StringBuilder builder( buffer, size );
464 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
465 {
466 builder.Reset();
467 return 0;
468 }
469
470 builder.TrimTrailingZeros();
471 return builder.position();
472 }
473
474 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
475 {
476 double_conversion::StringBuilder builder( buffer, size );
477 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
478 {
479 builder.Reset();
480 return 0;
481 }
482
483 return builder.position();
484 }
485
486}

◆ ComputeGuess()

bool FIX::double_conversion::ComputeGuess ( Vector< const char > trimmed,
int exponent,
double * guess )
static

Definition at line 425 of file FieldConvertors.cpp.

455{
456
457// we include "double-conversion" project in FIX namespace
458// to avoid linking errors if quickfix is linked statically
459// and "double-conversion" is already used by target project
460
461#include "double-conversion/diy-fp.cc"
462#include "double-conversion/fixed-dtoa.cc"
463#include "double-conversion/bignum.cc"
464#include "double-conversion/bignum-dtoa.cc"
465#include "double-conversion/cached-powers.cc"
466#include "double-conversion/fast-dtoa.cc"
467#include "double-conversion/strtod.cc"
468#include "double-conversion/double-conversion.cc"
469
470 static double_conversion::DoubleToStringConverter g_dtoa_converter(
471 double_conversion::DoubleToStringConverter::NO_FLAGS,
472 "INF",
473 "NAN",
474 'e',
478 0);
479
480 static double_conversion::StringToDoubleConverter g_atod_converter(
481 double_conversion::StringToDoubleConverter::NO_FLAGS,
482 std::numeric_limits<double>::quiet_NaN(),
483 std::numeric_limits<double>::quiet_NaN(),
484 "INF",
485 "NAN");
486
487 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
488 {
489 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
490 }
491
492 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
493 {
494 double_conversion::StringBuilder builder( buffer, size );
495 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
496 {
497 builder.Reset();
498 return 0;
499 }
500
501 builder.TrimTrailingZeros();
502 return builder.position();
503 }
504
505 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
506 {
507 double_conversion::StringBuilder builder( buffer, size );
508 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
509 {
510 builder.Reset();
511 return 0;
512 }
513
514 return builder.position();
515 }
516
517}

◆ ConsumeSubString()

template<class Iterator>
bool FIX::double_conversion::ConsumeSubString ( Iterator * current,
Iterator end,
const char * substring )
static

Definition at line 423 of file FieldConvertors.cpp.

453{
454
455// we include "double-conversion" project in FIX namespace
456// to avoid linking errors if quickfix is linked statically
457// and "double-conversion" is already used by target project
458
459#include "double-conversion/diy-fp.cc"
460#include "double-conversion/fixed-dtoa.cc"
461#include "double-conversion/bignum.cc"
462#include "double-conversion/bignum-dtoa.cc"
463#include "double-conversion/cached-powers.cc"
464#include "double-conversion/fast-dtoa.cc"
465#include "double-conversion/strtod.cc"
466#include "double-conversion/double-conversion.cc"
467
468 static double_conversion::DoubleToStringConverter g_dtoa_converter(
469 double_conversion::DoubleToStringConverter::NO_FLAGS,
470 "INF",
471 "NAN",
472 'e',
476 0);
477
478 static double_conversion::StringToDoubleConverter g_atod_converter(
479 double_conversion::StringToDoubleConverter::NO_FLAGS,
480 std::numeric_limits<double>::quiet_NaN(),
481 std::numeric_limits<double>::quiet_NaN(),
482 "INF",
483 "NAN");
484
485 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
486 {
487 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
488 }
489
490 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
491 {
492 double_conversion::StringBuilder builder( buffer, size );
493 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
494 {
495 builder.Reset();
496 return 0;
497 }
498
499 builder.TrimTrailingZeros();
500 return builder.position();
501 }
502
503 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
504 {
505 double_conversion::StringBuilder builder( buffer, size );
506 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
507 {
508 builder.Reset();
509 return 0;
510 }
511
512 return builder.position();
513 }
514
515}

◆ CutToMaxSignificantDigits()

void FIX::double_conversion::CutToMaxSignificantDigits ( Vector< const char > buffer,
int exponent,
char * significant_buffer,
int * significant_exponent )
static

Definition at line 111 of file FieldConvertors.cpp.

141{
142
143// we include "double-conversion" project in FIX namespace
144// to avoid linking errors if quickfix is linked statically
145// and "double-conversion" is already used by target project
146
147#include "double-conversion/diy-fp.cc"
148#include "double-conversion/fixed-dtoa.cc"
149#include "double-conversion/bignum.cc"
150#include "double-conversion/bignum-dtoa.cc"
151#include "double-conversion/cached-powers.cc"
152#include "double-conversion/fast-dtoa.cc"
153#include "double-conversion/strtod.cc"
154#include "double-conversion/double-conversion.cc"
155
156 static double_conversion::DoubleToStringConverter g_dtoa_converter(
157 double_conversion::DoubleToStringConverter::NO_FLAGS,
158 "INF",
159 "NAN",
160 'e',
164 0);
165
166 static double_conversion::StringToDoubleConverter g_atod_converter(
167 double_conversion::StringToDoubleConverter::NO_FLAGS,
168 std::numeric_limits<double>::quiet_NaN(),
169 std::numeric_limits<double>::quiet_NaN(),
170 "INF",
171 "NAN");
172
173 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
174 {
175 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
176 }
177
178 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
179 {
180 double_conversion::StringBuilder builder( buffer, size );
181 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
182 {
183 builder.Reset();
184 return 0;
185 }
186
187 builder.TrimTrailingZeros();
188 return builder.position();
189 }
190
191 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
192 {
193 double_conversion::StringBuilder builder( buffer, size );
194 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
195 {
196 builder.Reset();
197 return 0;
198 }
199
200 return builder.position();
201 }
202
203}

◆ DigitGen()

bool FIX::double_conversion::DigitGen ( DiyFp low,
DiyFp w,
DiyFp high,
Vector< char > buffer,
int * length,
int * kappa )
static

Definition at line 300 of file FieldConvertors.cpp.

330{
331
332// we include "double-conversion" project in FIX namespace
333// to avoid linking errors if quickfix is linked statically
334// and "double-conversion" is already used by target project
335
336#include "double-conversion/diy-fp.cc"
337#include "double-conversion/fixed-dtoa.cc"
338#include "double-conversion/bignum.cc"
339#include "double-conversion/bignum-dtoa.cc"
340#include "double-conversion/cached-powers.cc"
341#include "double-conversion/fast-dtoa.cc"
342#include "double-conversion/strtod.cc"
343#include "double-conversion/double-conversion.cc"
344
345 static double_conversion::DoubleToStringConverter g_dtoa_converter(
346 double_conversion::DoubleToStringConverter::NO_FLAGS,
347 "INF",
348 "NAN",
349 'e',
353 0);
354
355 static double_conversion::StringToDoubleConverter g_atod_converter(
356 double_conversion::StringToDoubleConverter::NO_FLAGS,
357 std::numeric_limits<double>::quiet_NaN(),
358 std::numeric_limits<double>::quiet_NaN(),
359 "INF",
360 "NAN");
361
362 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
363 {
364 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
365 }
366
367 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
368 {
369 double_conversion::StringBuilder builder( buffer, size );
370 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
371 {
372 builder.Reset();
373 return 0;
374 }
375
376 builder.TrimTrailingZeros();
377 return builder.position();
378 }
379
380 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
381 {
382 double_conversion::StringBuilder builder( buffer, size );
383 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
384 {
385 builder.Reset();
386 return 0;
387 }
388
389 return builder.position();
390 }
391
392}

◆ DigitGenCounted()

bool FIX::double_conversion::DigitGenCounted ( DiyFp w,
int requested_digits,
Vector< char > buffer,
int * length,
int * kappa )
static

Definition at line 428 of file FieldConvertors.cpp.

458{
459
460// we include "double-conversion" project in FIX namespace
461// to avoid linking errors if quickfix is linked statically
462// and "double-conversion" is already used by target project
463
464#include "double-conversion/diy-fp.cc"
465#include "double-conversion/fixed-dtoa.cc"
466#include "double-conversion/bignum.cc"
467#include "double-conversion/bignum-dtoa.cc"
468#include "double-conversion/cached-powers.cc"
469#include "double-conversion/fast-dtoa.cc"
470#include "double-conversion/strtod.cc"
471#include "double-conversion/double-conversion.cc"
472
473 static double_conversion::DoubleToStringConverter g_dtoa_converter(
474 double_conversion::DoubleToStringConverter::NO_FLAGS,
475 "INF",
476 "NAN",
477 'e',
481 0);
482
483 static double_conversion::StringToDoubleConverter g_atod_converter(
484 double_conversion::StringToDoubleConverter::NO_FLAGS,
485 std::numeric_limits<double>::quiet_NaN(),
486 std::numeric_limits<double>::quiet_NaN(),
487 "INF",
488 "NAN");
489
490 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
491 {
492 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
493 }
494
495 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
496 {
497 double_conversion::StringBuilder builder( buffer, size );
498 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
499 {
500 builder.Reset();
501 return 0;
502 }
503
504 builder.TrimTrailingZeros();
505 return builder.position();
506 }
507
508 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
509 {
510 double_conversion::StringBuilder builder( buffer, size );
511 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
512 {
513 builder.Reset();
514 return 0;
515 }
516
517 return builder.position();
518 }
519
520}

◆ DiyFpStrtod()

bool FIX::double_conversion::DiyFpStrtod ( Vector< const char > buffer,
int exponent,
double * result )
static

Definition at line 276 of file FieldConvertors.cpp.

306{
307
308// we include "double-conversion" project in FIX namespace
309// to avoid linking errors if quickfix is linked statically
310// and "double-conversion" is already used by target project
311
312#include "double-conversion/diy-fp.cc"
313#include "double-conversion/fixed-dtoa.cc"
314#include "double-conversion/bignum.cc"
315#include "double-conversion/bignum-dtoa.cc"
316#include "double-conversion/cached-powers.cc"
317#include "double-conversion/fast-dtoa.cc"
318#include "double-conversion/strtod.cc"
319#include "double-conversion/double-conversion.cc"
320
321 static double_conversion::DoubleToStringConverter g_dtoa_converter(
322 double_conversion::DoubleToStringConverter::NO_FLAGS,
323 "INF",
324 "NAN",
325 'e',
329 0);
330
331 static double_conversion::StringToDoubleConverter g_atod_converter(
332 double_conversion::StringToDoubleConverter::NO_FLAGS,
333 std::numeric_limits<double>::quiet_NaN(),
334 std::numeric_limits<double>::quiet_NaN(),
335 "INF",
336 "NAN");
337
338 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
339 {
340 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
341 }
342
343 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
344 {
345 double_conversion::StringBuilder builder( buffer, size );
346 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
347 {
348 builder.Reset();
349 return 0;
350 }
351
352 builder.TrimTrailingZeros();
353 return builder.position();
354 }
355
356 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
357 {
358 double_conversion::StringBuilder builder( buffer, size );
359 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
360 {
361 builder.Reset();
362 return 0;
363 }
364
365 return builder.position();
366 }
367
368}

◆ double_to_uint64()

uint64_t FIX::double_conversion::double_to_uint64 ( double d)
static

Definition at line 36 of file FieldConvertors.cpp.

◆ DoubleStrtod()

bool FIX::double_conversion::DoubleStrtod ( Vector< const char > trimmed,
int exponent,
double * result )
static

Definition at line 197 of file FieldConvertors.cpp.

227{
228
229// we include "double-conversion" project in FIX namespace
230// to avoid linking errors if quickfix is linked statically
231// and "double-conversion" is already used by target project
232
233#include "double-conversion/diy-fp.cc"
234#include "double-conversion/fixed-dtoa.cc"
235#include "double-conversion/bignum.cc"
236#include "double-conversion/bignum-dtoa.cc"
237#include "double-conversion/cached-powers.cc"
238#include "double-conversion/fast-dtoa.cc"
239#include "double-conversion/strtod.cc"
240#include "double-conversion/double-conversion.cc"
241
242 static double_conversion::DoubleToStringConverter g_dtoa_converter(
243 double_conversion::DoubleToStringConverter::NO_FLAGS,
244 "INF",
245 "NAN",
246 'e',
250 0);
251
252 static double_conversion::StringToDoubleConverter g_atod_converter(
253 double_conversion::StringToDoubleConverter::NO_FLAGS,
254 std::numeric_limits<double>::quiet_NaN(),
255 std::numeric_limits<double>::quiet_NaN(),
256 "INF",
257 "NAN");
258
259 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
260 {
261 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
262 }
263
264 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
265 {
266 double_conversion::StringBuilder builder( buffer, size );
267 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
268 {
269 builder.Reset();
270 return 0;
271 }
272
273 builder.TrimTrailingZeros();
274 return builder.position();
275 }
276
277 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
278 {
279 double_conversion::StringBuilder builder( buffer, size );
280 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
281 {
282 builder.Reset();
283 return 0;
284 }
285
286 return builder.position();
287 }
288
289}

◆ DtoaToBignumDtoaMode()

BignumDtoaMode FIX::double_conversion::DtoaToBignumDtoaMode ( DoubleToStringConverter::DtoaMode dtoa_mode)
static

Definition at line 342 of file FieldConvertors.cpp.

372{
373
374// we include "double-conversion" project in FIX namespace
375// to avoid linking errors if quickfix is linked statically
376// and "double-conversion" is already used by target project
377
378#include "double-conversion/diy-fp.cc"
379#include "double-conversion/fixed-dtoa.cc"
380#include "double-conversion/bignum.cc"
381#include "double-conversion/bignum-dtoa.cc"
382#include "double-conversion/cached-powers.cc"
383#include "double-conversion/fast-dtoa.cc"
384#include "double-conversion/strtod.cc"
385#include "double-conversion/double-conversion.cc"
386
387 static double_conversion::DoubleToStringConverter g_dtoa_converter(
388 double_conversion::DoubleToStringConverter::NO_FLAGS,
389 "INF",
390 "NAN",
391 'e',
395 0);
396
397 static double_conversion::StringToDoubleConverter g_atod_converter(
398 double_conversion::StringToDoubleConverter::NO_FLAGS,
399 std::numeric_limits<double>::quiet_NaN(),
400 std::numeric_limits<double>::quiet_NaN(),
401 "INF",
402 "NAN");
403
404 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
405 {
406 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
407 }
408
409 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
410 {
411 double_conversion::StringBuilder builder( buffer, size );
412 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
413 {
414 builder.Reset();
415 return 0;
416 }
417
418 builder.TrimTrailingZeros();
419 return builder.position();
420 }
421
422 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
423 {
424 double_conversion::StringBuilder builder( buffer, size );
425 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
426 {
427 builder.Reset();
428 return 0;
429 }
430
431 return builder.position();
432 }
433
434}

◆ EstimatePower()

int FIX::double_conversion::EstimatePower ( int exponent)
static

Definition at line 385 of file FieldConvertors.cpp.

415{
416
417// we include "double-conversion" project in FIX namespace
418// to avoid linking errors if quickfix is linked statically
419// and "double-conversion" is already used by target project
420
421#include "double-conversion/diy-fp.cc"
422#include "double-conversion/fixed-dtoa.cc"
423#include "double-conversion/bignum.cc"
424#include "double-conversion/bignum-dtoa.cc"
425#include "double-conversion/cached-powers.cc"
426#include "double-conversion/fast-dtoa.cc"
427#include "double-conversion/strtod.cc"
428#include "double-conversion/double-conversion.cc"
429
430 static double_conversion::DoubleToStringConverter g_dtoa_converter(
431 double_conversion::DoubleToStringConverter::NO_FLAGS,
432 "INF",
433 "NAN",
434 'e',
438 0);
439
440 static double_conversion::StringToDoubleConverter g_atod_converter(
441 double_conversion::StringToDoubleConverter::NO_FLAGS,
442 std::numeric_limits<double>::quiet_NaN(),
443 std::numeric_limits<double>::quiet_NaN(),
444 "INF",
445 "NAN");
446
447 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
448 {
449 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
450 }
451
452 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
453 {
454 double_conversion::StringBuilder builder( buffer, size );
455 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
456 {
457 builder.Reset();
458 return 0;
459 }
460
461 builder.TrimTrailingZeros();
462 return builder.position();
463 }
464
465 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
466 {
467 double_conversion::StringBuilder builder( buffer, size );
468 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
469 {
470 builder.Reset();
471 return 0;
472 }
473
474 return builder.position();
475 }
476
477}

◆ FastDtoa()

bool FIX::double_conversion::FastDtoa ( double d,
FastDtoaMode mode,
int requested_digits,
Vector< char > buffer,
int * length,
int * decimal_point )

Definition at line 635 of file FieldConvertors.cpp.

665{
666
667// we include "double-conversion" project in FIX namespace
668// to avoid linking errors if quickfix is linked statically
669// and "double-conversion" is already used by target project
670
671#include "double-conversion/diy-fp.cc"
672#include "double-conversion/fixed-dtoa.cc"
673#include "double-conversion/bignum.cc"
674#include "double-conversion/bignum-dtoa.cc"
675#include "double-conversion/cached-powers.cc"
676#include "double-conversion/fast-dtoa.cc"
677#include "double-conversion/strtod.cc"
678#include "double-conversion/double-conversion.cc"
679
680 static double_conversion::DoubleToStringConverter g_dtoa_converter(
681 double_conversion::DoubleToStringConverter::NO_FLAGS,
682 "INF",
683 "NAN",
684 'e',
688 0);
689
690 static double_conversion::StringToDoubleConverter g_atod_converter(
691 double_conversion::StringToDoubleConverter::NO_FLAGS,
692 std::numeric_limits<double>::quiet_NaN(),
693 std::numeric_limits<double>::quiet_NaN(),
694 "INF",
695 "NAN");
696
697 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
698 {
699 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
700 }
701
702 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
703 {
704 double_conversion::StringBuilder builder( buffer, size );
705 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
706 {
707 builder.Reset();
708 return 0;
709 }
710
711 builder.TrimTrailingZeros();
712 return builder.position();
713 }
714
715 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
716 {
717 double_conversion::StringBuilder builder( buffer, size );
718 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
719 {
720 builder.Reset();
721 return 0;
722 }
723
724 return builder.position();
725 }
726
727}

◆ FixupMultiply10()

void FIX::double_conversion::FixupMultiply10 ( int estimated_power,
bool is_even,
int * decimal_point,
Bignum * numerator,
Bignum * denominator,
Bignum * delta_minus,
Bignum * delta_plus )
static

Definition at line 612 of file FieldConvertors.cpp.

642{
643
644// we include "double-conversion" project in FIX namespace
645// to avoid linking errors if quickfix is linked statically
646// and "double-conversion" is already used by target project
647
648#include "double-conversion/diy-fp.cc"
649#include "double-conversion/fixed-dtoa.cc"
650#include "double-conversion/bignum.cc"
651#include "double-conversion/bignum-dtoa.cc"
652#include "double-conversion/cached-powers.cc"
653#include "double-conversion/fast-dtoa.cc"
654#include "double-conversion/strtod.cc"
655#include "double-conversion/double-conversion.cc"
656
657 static double_conversion::DoubleToStringConverter g_dtoa_converter(
658 double_conversion::DoubleToStringConverter::NO_FLAGS,
659 "INF",
660 "NAN",
661 'e',
665 0);
666
667 static double_conversion::StringToDoubleConverter g_atod_converter(
668 double_conversion::StringToDoubleConverter::NO_FLAGS,
669 std::numeric_limits<double>::quiet_NaN(),
670 std::numeric_limits<double>::quiet_NaN(),
671 "INF",
672 "NAN");
673
674 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
675 {
676 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
677 }
678
679 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
680 {
681 double_conversion::StringBuilder builder( buffer, size );
682 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
683 {
684 builder.Reset();
685 return 0;
686 }
687
688 builder.TrimTrailingZeros();
689 return builder.position();
690 }
691
692 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
693 {
694 double_conversion::StringBuilder builder( buffer, size );
695 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
696 {
697 builder.Reset();
698 return 0;
699 }
700
701 return builder.position();
702 }
703
704}

◆ float_to_uint32()

uint32_t FIX::double_conversion::float_to_uint32 ( float f)
static

Definition at line 38 of file FieldConvertors.cpp.

◆ GenerateCountedDigits() [1/2]

void FIX::double_conversion::GenerateCountedDigits ( int count,
int * decimal_point,
Bignum * numerator,
Bignum * denominator,
Vector< char > buffer,
int * length )
static

Definition at line 283 of file FieldConvertors.cpp.

313{
314
315// we include "double-conversion" project in FIX namespace
316// to avoid linking errors if quickfix is linked statically
317// and "double-conversion" is already used by target project
318
319#include "double-conversion/diy-fp.cc"
320#include "double-conversion/fixed-dtoa.cc"
321#include "double-conversion/bignum.cc"
322#include "double-conversion/bignum-dtoa.cc"
323#include "double-conversion/cached-powers.cc"
324#include "double-conversion/fast-dtoa.cc"
325#include "double-conversion/strtod.cc"
326#include "double-conversion/double-conversion.cc"
327
328 static double_conversion::DoubleToStringConverter g_dtoa_converter(
329 double_conversion::DoubleToStringConverter::NO_FLAGS,
330 "INF",
331 "NAN",
332 'e',
336 0);
337
338 static double_conversion::StringToDoubleConverter g_atod_converter(
339 double_conversion::StringToDoubleConverter::NO_FLAGS,
340 std::numeric_limits<double>::quiet_NaN(),
341 std::numeric_limits<double>::quiet_NaN(),
342 "INF",
343 "NAN");
344
345 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
346 {
347 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
348 }
349
350 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
351 {
352 double_conversion::StringBuilder builder( buffer, size );
353 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
354 {
355 builder.Reset();
356 return 0;
357 }
358
359 builder.TrimTrailingZeros();
360 return builder.position();
361 }
362
363 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
364 {
365 double_conversion::StringBuilder builder( buffer, size );
366 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
367 {
368 builder.Reset();
369 return 0;
370 }
371
372 return builder.position();
373 }
374
375}

◆ GenerateCountedDigits() [2/2]

void FIX::double_conversion::GenerateCountedDigits ( int count,
int * decimal_point,
Bignum * numerator,
Bignum * denominator,
Vector< char > buffer,
int * length )
static

◆ GenerateShortestDigits()

void FIX::double_conversion::GenerateShortestDigits ( Bignum * numerator,
Bignum * denominator,
Bignum * delta_minus,
Bignum * delta_plus,
bool is_even,
Vector< char > buffer,
int * length )
static

Definition at line 185 of file FieldConvertors.cpp.

215{
216
217// we include "double-conversion" project in FIX namespace
218// to avoid linking errors if quickfix is linked statically
219// and "double-conversion" is already used by target project
220
221#include "double-conversion/diy-fp.cc"
222#include "double-conversion/fixed-dtoa.cc"
223#include "double-conversion/bignum.cc"
224#include "double-conversion/bignum-dtoa.cc"
225#include "double-conversion/cached-powers.cc"
226#include "double-conversion/fast-dtoa.cc"
227#include "double-conversion/strtod.cc"
228#include "double-conversion/double-conversion.cc"
229
230 static double_conversion::DoubleToStringConverter g_dtoa_converter(
231 double_conversion::DoubleToStringConverter::NO_FLAGS,
232 "INF",
233 "NAN",
234 'e',
238 0);
239
240 static double_conversion::StringToDoubleConverter g_atod_converter(
241 double_conversion::StringToDoubleConverter::NO_FLAGS,
242 std::numeric_limits<double>::quiet_NaN(),
243 std::numeric_limits<double>::quiet_NaN(),
244 "INF",
245 "NAN");
246
247 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
248 {
249 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
250 }
251
252 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
253 {
254 double_conversion::StringBuilder builder( buffer, size );
255 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
256 {
257 builder.Reset();
258 return 0;
259 }
260
261 builder.TrimTrailingZeros();
262 return builder.position();
263 }
264
265 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
266 {
267 double_conversion::StringBuilder builder( buffer, size );
268 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
269 {
270 builder.Reset();
271 return 0;
272 }
273
274 return builder.position();
275 }
276
277}

◆ Grisu3()

bool FIX::double_conversion::Grisu3 ( double v,
FastDtoaMode mode,
Vector< char > buffer,
int * length,
int * decimal_exponent )
static

Definition at line 519 of file FieldConvertors.cpp.

549{
550
551// we include "double-conversion" project in FIX namespace
552// to avoid linking errors if quickfix is linked statically
553// and "double-conversion" is already used by target project
554
555#include "double-conversion/diy-fp.cc"
556#include "double-conversion/fixed-dtoa.cc"
557#include "double-conversion/bignum.cc"
558#include "double-conversion/bignum-dtoa.cc"
559#include "double-conversion/cached-powers.cc"
560#include "double-conversion/fast-dtoa.cc"
561#include "double-conversion/strtod.cc"
562#include "double-conversion/double-conversion.cc"
563
564 static double_conversion::DoubleToStringConverter g_dtoa_converter(
565 double_conversion::DoubleToStringConverter::NO_FLAGS,
566 "INF",
567 "NAN",
568 'e',
572 0);
573
574 static double_conversion::StringToDoubleConverter g_atod_converter(
575 double_conversion::StringToDoubleConverter::NO_FLAGS,
576 std::numeric_limits<double>::quiet_NaN(),
577 std::numeric_limits<double>::quiet_NaN(),
578 "INF",
579 "NAN");
580
581 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
582 {
583 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
584 }
585
586 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
587 {
588 double_conversion::StringBuilder builder( buffer, size );
589 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
590 {
591 builder.Reset();
592 return 0;
593 }
594
595 builder.TrimTrailingZeros();
596 return builder.position();
597 }
598
599 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
600 {
601 double_conversion::StringBuilder builder( buffer, size );
602 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
603 {
604 builder.Reset();
605 return 0;
606 }
607
608 return builder.position();
609 }
610
611}

◆ Grisu3Counted()

bool FIX::double_conversion::Grisu3Counted ( double v,
int requested_digits,
Vector< char > buffer,
int * length,
int * decimal_exponent )
static

Definition at line 591 of file FieldConvertors.cpp.

621{
622
623// we include "double-conversion" project in FIX namespace
624// to avoid linking errors if quickfix is linked statically
625// and "double-conversion" is already used by target project
626
627#include "double-conversion/diy-fp.cc"
628#include "double-conversion/fixed-dtoa.cc"
629#include "double-conversion/bignum.cc"
630#include "double-conversion/bignum-dtoa.cc"
631#include "double-conversion/cached-powers.cc"
632#include "double-conversion/fast-dtoa.cc"
633#include "double-conversion/strtod.cc"
634#include "double-conversion/double-conversion.cc"
635
636 static double_conversion::DoubleToStringConverter g_dtoa_converter(
637 double_conversion::DoubleToStringConverter::NO_FLAGS,
638 "INF",
639 "NAN",
640 'e',
644 0);
645
646 static double_conversion::StringToDoubleConverter g_atod_converter(
647 double_conversion::StringToDoubleConverter::NO_FLAGS,
648 std::numeric_limits<double>::quiet_NaN(),
649 std::numeric_limits<double>::quiet_NaN(),
650 "INF",
651 "NAN");
652
653 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
654 {
655 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
656 }
657
658 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
659 {
660 double_conversion::StringBuilder builder( buffer, size );
661 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
662 {
663 builder.Reset();
664 return 0;
665 }
666
667 builder.TrimTrailingZeros();
668 return builder.position();
669 }
670
671 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
672 {
673 double_conversion::StringBuilder builder( buffer, size );
674 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
675 {
676 builder.Reset();
677 return 0;
678 }
679
680 return builder.position();
681 }
682
683}

◆ HexCharOfValue()

char FIX::double_conversion::HexCharOfValue ( int value)
static

Definition at line 565 of file FieldConvertors.cpp.

595{
596
597// we include "double-conversion" project in FIX namespace
598// to avoid linking errors if quickfix is linked statically
599// and "double-conversion" is already used by target project
600
601#include "double-conversion/diy-fp.cc"
602#include "double-conversion/fixed-dtoa.cc"
603#include "double-conversion/bignum.cc"
604#include "double-conversion/bignum-dtoa.cc"
605#include "double-conversion/cached-powers.cc"
606#include "double-conversion/fast-dtoa.cc"
607#include "double-conversion/strtod.cc"
608#include "double-conversion/double-conversion.cc"
609
610 static double_conversion::DoubleToStringConverter g_dtoa_converter(
611 double_conversion::DoubleToStringConverter::NO_FLAGS,
612 "INF",
613 "NAN",
614 'e',
618 0);
619
620 static double_conversion::StringToDoubleConverter g_atod_converter(
621 double_conversion::StringToDoubleConverter::NO_FLAGS,
622 std::numeric_limits<double>::quiet_NaN(),
623 std::numeric_limits<double>::quiet_NaN(),
624 "INF",
625 "NAN");
626
627 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
628 {
629 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
630 }
631
632 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
633 {
634 double_conversion::StringBuilder builder( buffer, size );
635 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
636 {
637 builder.Reset();
638 return 0;
639 }
640
641 builder.TrimTrailingZeros();
642 return builder.position();
643 }
644
645 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
646 {
647 double_conversion::StringBuilder builder( buffer, size );
648 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
649 {
650 builder.Reset();
651 return 0;
652 }
653
654 return builder.position();
655 }
656
657}

◆ HexCharValue()

int FIX::double_conversion::HexCharValue ( char c)
static

Definition at line 124 of file FieldConvertors.cpp.

154{
155
156// we include "double-conversion" project in FIX namespace
157// to avoid linking errors if quickfix is linked statically
158// and "double-conversion" is already used by target project
159
160#include "double-conversion/diy-fp.cc"
161#include "double-conversion/fixed-dtoa.cc"
162#include "double-conversion/bignum.cc"
163#include "double-conversion/bignum-dtoa.cc"
164#include "double-conversion/cached-powers.cc"
165#include "double-conversion/fast-dtoa.cc"
166#include "double-conversion/strtod.cc"
167#include "double-conversion/double-conversion.cc"
168
169 static double_conversion::DoubleToStringConverter g_dtoa_converter(
170 double_conversion::DoubleToStringConverter::NO_FLAGS,
171 "INF",
172 "NAN",
173 'e',
177 0);
178
179 static double_conversion::StringToDoubleConverter g_atod_converter(
180 double_conversion::StringToDoubleConverter::NO_FLAGS,
181 std::numeric_limits<double>::quiet_NaN(),
182 std::numeric_limits<double>::quiet_NaN(),
183 "INF",
184 "NAN");
185
186 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
187 {
188 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
189 }
190
191 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
192 {
193 double_conversion::StringBuilder builder( buffer, size );
194 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
195 {
196 builder.Reset();
197 return 0;
198 }
199
200 builder.TrimTrailingZeros();
201 return builder.position();
202 }
203
204 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
205 {
206 double_conversion::StringBuilder builder( buffer, size );
207 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
208 {
209 builder.Reset();
210 return 0;
211 }
212
213 return builder.position();
214 }
215
216}

◆ InitialScaledStartValues()

void FIX::double_conversion::InitialScaledStartValues ( uint64_t significand,
int exponent,
bool lower_boundary_is_closer,
int estimated_power,
bool need_boundary_deltas,
Bignum * numerator,
Bignum * denominator,
Bignum * delta_minus,
Bignum * delta_plus )
static

Definition at line 568 of file FieldConvertors.cpp.

598{
599
600// we include "double-conversion" project in FIX namespace
601// to avoid linking errors if quickfix is linked statically
602// and "double-conversion" is already used by target project
603
604#include "double-conversion/diy-fp.cc"
605#include "double-conversion/fixed-dtoa.cc"
606#include "double-conversion/bignum.cc"
607#include "double-conversion/bignum-dtoa.cc"
608#include "double-conversion/cached-powers.cc"
609#include "double-conversion/fast-dtoa.cc"
610#include "double-conversion/strtod.cc"
611#include "double-conversion/double-conversion.cc"
612
613 static double_conversion::DoubleToStringConverter g_dtoa_converter(
614 double_conversion::DoubleToStringConverter::NO_FLAGS,
615 "INF",
616 "NAN",
617 'e',
621 0);
622
623 static double_conversion::StringToDoubleConverter g_atod_converter(
624 double_conversion::StringToDoubleConverter::NO_FLAGS,
625 std::numeric_limits<double>::quiet_NaN(),
626 std::numeric_limits<double>::quiet_NaN(),
627 "INF",
628 "NAN");
629
630 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
631 {
632 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
633 }
634
635 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
636 {
637 double_conversion::StringBuilder builder( buffer, size );
638 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
639 {
640 builder.Reset();
641 return 0;
642 }
643
644 builder.TrimTrailingZeros();
645 return builder.position();
646 }
647
648 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
649 {
650 double_conversion::StringBuilder builder( buffer, size );
651 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
652 {
653 builder.Reset();
654 return 0;
655 }
656
657 return builder.position();
658 }
659
660}

◆ InitialScaledStartValuesNegativeExponentNegativePower()

void FIX::double_conversion::InitialScaledStartValuesNegativeExponentNegativePower ( uint64_t significand,
int exponent,
int estimated_power,
bool need_boundary_deltas,
Bignum * numerator,
Bignum * denominator,
Bignum * delta_minus,
Bignum * delta_plus )
static

Definition at line 484 of file FieldConvertors.cpp.

514{
515
516// we include "double-conversion" project in FIX namespace
517// to avoid linking errors if quickfix is linked statically
518// and "double-conversion" is already used by target project
519
520#include "double-conversion/diy-fp.cc"
521#include "double-conversion/fixed-dtoa.cc"
522#include "double-conversion/bignum.cc"
523#include "double-conversion/bignum-dtoa.cc"
524#include "double-conversion/cached-powers.cc"
525#include "double-conversion/fast-dtoa.cc"
526#include "double-conversion/strtod.cc"
527#include "double-conversion/double-conversion.cc"
528
529 static double_conversion::DoubleToStringConverter g_dtoa_converter(
530 double_conversion::DoubleToStringConverter::NO_FLAGS,
531 "INF",
532 "NAN",
533 'e',
537 0);
538
539 static double_conversion::StringToDoubleConverter g_atod_converter(
540 double_conversion::StringToDoubleConverter::NO_FLAGS,
541 std::numeric_limits<double>::quiet_NaN(),
542 std::numeric_limits<double>::quiet_NaN(),
543 "INF",
544 "NAN");
545
546 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
547 {
548 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
549 }
550
551 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
552 {
553 double_conversion::StringBuilder builder( buffer, size );
554 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
555 {
556 builder.Reset();
557 return 0;
558 }
559
560 builder.TrimTrailingZeros();
561 return builder.position();
562 }
563
564 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
565 {
566 double_conversion::StringBuilder builder( buffer, size );
567 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
568 {
569 builder.Reset();
570 return 0;
571 }
572
573 return builder.position();
574 }
575
576}

◆ InitialScaledStartValuesNegativeExponentPositivePower()

void FIX::double_conversion::InitialScaledStartValuesNegativeExponentPositivePower ( uint64_t significand,
int exponent,
int estimated_power,
bool need_boundary_deltas,
Bignum * numerator,
Bignum * denominator,
Bignum * delta_minus,
Bignum * delta_plus )
static

Definition at line 450 of file FieldConvertors.cpp.

480{
481
482// we include "double-conversion" project in FIX namespace
483// to avoid linking errors if quickfix is linked statically
484// and "double-conversion" is already used by target project
485
486#include "double-conversion/diy-fp.cc"
487#include "double-conversion/fixed-dtoa.cc"
488#include "double-conversion/bignum.cc"
489#include "double-conversion/bignum-dtoa.cc"
490#include "double-conversion/cached-powers.cc"
491#include "double-conversion/fast-dtoa.cc"
492#include "double-conversion/strtod.cc"
493#include "double-conversion/double-conversion.cc"
494
495 static double_conversion::DoubleToStringConverter g_dtoa_converter(
496 double_conversion::DoubleToStringConverter::NO_FLAGS,
497 "INF",
498 "NAN",
499 'e',
503 0);
504
505 static double_conversion::StringToDoubleConverter g_atod_converter(
506 double_conversion::StringToDoubleConverter::NO_FLAGS,
507 std::numeric_limits<double>::quiet_NaN(),
508 std::numeric_limits<double>::quiet_NaN(),
509 "INF",
510 "NAN");
511
512 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
513 {
514 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
515 }
516
517 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
518 {
519 double_conversion::StringBuilder builder( buffer, size );
520 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
521 {
522 builder.Reset();
523 return 0;
524 }
525
526 builder.TrimTrailingZeros();
527 return builder.position();
528 }
529
530 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
531 {
532 double_conversion::StringBuilder builder( buffer, size );
533 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
534 {
535 builder.Reset();
536 return 0;
537 }
538
539 return builder.position();
540 }
541
542}

◆ InitialScaledStartValuesPositiveExponent()

void FIX::double_conversion::InitialScaledStartValuesPositiveExponent ( uint64_t significand,
int exponent,
int estimated_power,
bool need_boundary_deltas,
Bignum * numerator,
Bignum * denominator,
Bignum * delta_minus,
Bignum * delta_plus )
static

Definition at line 417 of file FieldConvertors.cpp.

447{
448
449// we include "double-conversion" project in FIX namespace
450// to avoid linking errors if quickfix is linked statically
451// and "double-conversion" is already used by target project
452
453#include "double-conversion/diy-fp.cc"
454#include "double-conversion/fixed-dtoa.cc"
455#include "double-conversion/bignum.cc"
456#include "double-conversion/bignum-dtoa.cc"
457#include "double-conversion/cached-powers.cc"
458#include "double-conversion/fast-dtoa.cc"
459#include "double-conversion/strtod.cc"
460#include "double-conversion/double-conversion.cc"
461
462 static double_conversion::DoubleToStringConverter g_dtoa_converter(
463 double_conversion::DoubleToStringConverter::NO_FLAGS,
464 "INF",
465 "NAN",
466 'e',
470 0);
471
472 static double_conversion::StringToDoubleConverter g_atod_converter(
473 double_conversion::StringToDoubleConverter::NO_FLAGS,
474 std::numeric_limits<double>::quiet_NaN(),
475 std::numeric_limits<double>::quiet_NaN(),
476 "INF",
477 "NAN");
478
479 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
480 {
481 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
482 }
483
484 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
485 {
486 double_conversion::StringBuilder builder( buffer, size );
487 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
488 {
489 builder.Reset();
490 return 0;
491 }
492
493 builder.TrimTrailingZeros();
494 return builder.position();
495 }
496
497 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
498 {
499 double_conversion::StringBuilder builder( buffer, size );
500 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
501 {
502 builder.Reset();
503 return 0;
504 }
505
506 return builder.position();
507 }
508
509}

◆ IsCharacterDigitForRadix()

bool FIX::double_conversion::IsCharacterDigitForRadix ( int c,
int radix,
char a_character )
static

Definition at line 527 of file FieldConvertors.cpp.

557{
558
559// we include "double-conversion" project in FIX namespace
560// to avoid linking errors if quickfix is linked statically
561// and "double-conversion" is already used by target project
562
563#include "double-conversion/diy-fp.cc"
564#include "double-conversion/fixed-dtoa.cc"
565#include "double-conversion/bignum.cc"
566#include "double-conversion/bignum-dtoa.cc"
567#include "double-conversion/cached-powers.cc"
568#include "double-conversion/fast-dtoa.cc"
569#include "double-conversion/strtod.cc"
570#include "double-conversion/double-conversion.cc"
571
572 static double_conversion::DoubleToStringConverter g_dtoa_converter(
573 double_conversion::DoubleToStringConverter::NO_FLAGS,
574 "INF",
575 "NAN",
576 'e',
580 0);
581
582 static double_conversion::StringToDoubleConverter g_atod_converter(
583 double_conversion::StringToDoubleConverter::NO_FLAGS,
584 std::numeric_limits<double>::quiet_NaN(),
585 std::numeric_limits<double>::quiet_NaN(),
586 "INF",
587 "NAN");
588
589 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
590 {
591 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
592 }
593
594 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
595 {
596 double_conversion::StringBuilder builder( buffer, size );
597 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
598 {
599 builder.Reset();
600 return 0;
601 }
602
603 builder.TrimTrailingZeros();
604 return builder.position();
605 }
606
607 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
608 {
609 double_conversion::StringBuilder builder( buffer, size );
610 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
611 {
612 builder.Reset();
613 return 0;
614 }
615
616 return builder.position();
617 }
618
619}

◆ IsDecimalDigitForRadix()

bool FIX::double_conversion::IsDecimalDigitForRadix ( int c,
int radix )
inlinestatic

Definition at line 513 of file FieldConvertors.cpp.

543{
544
545// we include "double-conversion" project in FIX namespace
546// to avoid linking errors if quickfix is linked statically
547// and "double-conversion" is already used by target project
548
549#include "double-conversion/diy-fp.cc"
550#include "double-conversion/fixed-dtoa.cc"
551#include "double-conversion/bignum.cc"
552#include "double-conversion/bignum-dtoa.cc"
553#include "double-conversion/cached-powers.cc"
554#include "double-conversion/fast-dtoa.cc"
555#include "double-conversion/strtod.cc"
556#include "double-conversion/double-conversion.cc"
557
558 static double_conversion::DoubleToStringConverter g_dtoa_converter(
559 double_conversion::DoubleToStringConverter::NO_FLAGS,
560 "INF",
561 "NAN",
562 'e',
566 0);
567
568 static double_conversion::StringToDoubleConverter g_atod_converter(
569 double_conversion::StringToDoubleConverter::NO_FLAGS,
570 std::numeric_limits<double>::quiet_NaN(),
571 std::numeric_limits<double>::quiet_NaN(),
572 "INF",
573 "NAN");
574
575 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
576 {
577 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
578 }
579
580 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
581 {
582 double_conversion::StringBuilder builder( buffer, size );
583 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
584 {
585 builder.Reset();
586 return 0;
587 }
588
589 builder.TrimTrailingZeros();
590 return builder.position();
591 }
592
593 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
594 {
595 double_conversion::StringBuilder builder( buffer, size );
596 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
597 {
598 builder.Reset();
599 return 0;
600 }
601
602 return builder.position();
603 }
604
605}

◆ isDigit()

bool FIX::double_conversion::isDigit ( int x,
int radix )
static

Definition at line 487 of file FieldConvertors.cpp.

517{
518
519// we include "double-conversion" project in FIX namespace
520// to avoid linking errors if quickfix is linked statically
521// and "double-conversion" is already used by target project
522
523#include "double-conversion/diy-fp.cc"
524#include "double-conversion/fixed-dtoa.cc"
525#include "double-conversion/bignum.cc"
526#include "double-conversion/bignum-dtoa.cc"
527#include "double-conversion/cached-powers.cc"
528#include "double-conversion/fast-dtoa.cc"
529#include "double-conversion/strtod.cc"
530#include "double-conversion/double-conversion.cc"
531
532 static double_conversion::DoubleToStringConverter g_dtoa_converter(
533 double_conversion::DoubleToStringConverter::NO_FLAGS,
534 "INF",
535 "NAN",
536 'e',
540 0);
541
542 static double_conversion::StringToDoubleConverter g_atod_converter(
543 double_conversion::StringToDoubleConverter::NO_FLAGS,
544 std::numeric_limits<double>::quiet_NaN(),
545 std::numeric_limits<double>::quiet_NaN(),
546 "INF",
547 "NAN");
548
549 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
550 {
551 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
552 }
553
554 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
555 {
556 double_conversion::StringBuilder builder( buffer, size );
557 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
558 {
559 builder.Reset();
560 return 0;
561 }
562
563 builder.TrimTrailingZeros();
564 return builder.position();
565 }
566
567 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
568 {
569 double_conversion::StringBuilder builder( buffer, size );
570 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
571 {
572 builder.Reset();
573 return 0;
574 }
575
576 return builder.position();
577 }
578
579}

◆ isWhitespace()

bool FIX::double_conversion::isWhitespace ( int x)
static

Definition at line 459 of file FieldConvertors.cpp.

489{
490
491// we include "double-conversion" project in FIX namespace
492// to avoid linking errors if quickfix is linked statically
493// and "double-conversion" is already used by target project
494
495#include "double-conversion/diy-fp.cc"
496#include "double-conversion/fixed-dtoa.cc"
497#include "double-conversion/bignum.cc"
498#include "double-conversion/bignum-dtoa.cc"
499#include "double-conversion/cached-powers.cc"
500#include "double-conversion/fast-dtoa.cc"
501#include "double-conversion/strtod.cc"
502#include "double-conversion/double-conversion.cc"
503
504 static double_conversion::DoubleToStringConverter g_dtoa_converter(
505 double_conversion::DoubleToStringConverter::NO_FLAGS,
506 "INF",
507 "NAN",
508 'e',
512 0);
513
514 static double_conversion::StringToDoubleConverter g_atod_converter(
515 double_conversion::StringToDoubleConverter::NO_FLAGS,
516 std::numeric_limits<double>::quiet_NaN(),
517 std::numeric_limits<double>::quiet_NaN(),
518 "INF",
519 "NAN");
520
521 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
522 {
523 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
524 }
525
526 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
527 {
528 double_conversion::StringBuilder builder( buffer, size );
529 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
530 {
531 builder.Reset();
532 return 0;
533 }
534
535 builder.TrimTrailingZeros();
536 return builder.position();
537 }
538
539 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
540 {
541 double_conversion::StringBuilder builder( buffer, size );
542 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
543 {
544 builder.Reset();
545 return 0;
546 }
547
548 return builder.position();
549 }
550
551}

◆ NormalizedExponent()

int FIX::double_conversion::NormalizedExponent ( uint64_t significand,
int exponent )
static

Definition at line 37 of file FieldConvertors.cpp.

◆ RadixStringToIeee()

template<int radix_log_2, class Iterator>
double FIX::double_conversion::RadixStringToIeee ( Iterator * current,
Iterator end,
bool sign,
bool allow_trailing_junk,
double junk_string_value,
bool read_as_double,
bool * result_is_junk )
static

Definition at line 535 of file FieldConvertors.cpp.

565{
566
567// we include "double-conversion" project in FIX namespace
568// to avoid linking errors if quickfix is linked statically
569// and "double-conversion" is already used by target project
570
571#include "double-conversion/diy-fp.cc"
572#include "double-conversion/fixed-dtoa.cc"
573#include "double-conversion/bignum.cc"
574#include "double-conversion/bignum-dtoa.cc"
575#include "double-conversion/cached-powers.cc"
576#include "double-conversion/fast-dtoa.cc"
577#include "double-conversion/strtod.cc"
578#include "double-conversion/double-conversion.cc"
579
580 static double_conversion::DoubleToStringConverter g_dtoa_converter(
581 double_conversion::DoubleToStringConverter::NO_FLAGS,
582 "INF",
583 "NAN",
584 'e',
588 0);
589
590 static double_conversion::StringToDoubleConverter g_atod_converter(
591 double_conversion::StringToDoubleConverter::NO_FLAGS,
592 std::numeric_limits<double>::quiet_NaN(),
593 std::numeric_limits<double>::quiet_NaN(),
594 "INF",
595 "NAN");
596
597 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
598 {
599 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
600 }
601
602 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
603 {
604 double_conversion::StringBuilder builder( buffer, size );
605 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
606 {
607 builder.Reset();
608 return 0;
609 }
610
611 builder.TrimTrailingZeros();
612 return builder.position();
613 }
614
615 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
616 {
617 double_conversion::StringBuilder builder( buffer, size );
618 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
619 {
620 builder.Reset();
621 return 0;
622 }
623
624 return builder.position();
625 }
626
627}

◆ ReadDiyFp()

void FIX::double_conversion::ReadDiyFp ( Vector< const char > buffer,
DiyFp * result,
int * remaining_decimals )
static

Definition at line 176 of file FieldConvertors.cpp.

206{
207
208// we include "double-conversion" project in FIX namespace
209// to avoid linking errors if quickfix is linked statically
210// and "double-conversion" is already used by target project
211
212#include "double-conversion/diy-fp.cc"
213#include "double-conversion/fixed-dtoa.cc"
214#include "double-conversion/bignum.cc"
215#include "double-conversion/bignum-dtoa.cc"
216#include "double-conversion/cached-powers.cc"
217#include "double-conversion/fast-dtoa.cc"
218#include "double-conversion/strtod.cc"
219#include "double-conversion/double-conversion.cc"
220
221 static double_conversion::DoubleToStringConverter g_dtoa_converter(
222 double_conversion::DoubleToStringConverter::NO_FLAGS,
223 "INF",
224 "NAN",
225 'e',
229 0);
230
231 static double_conversion::StringToDoubleConverter g_atod_converter(
232 double_conversion::StringToDoubleConverter::NO_FLAGS,
233 std::numeric_limits<double>::quiet_NaN(),
234 std::numeric_limits<double>::quiet_NaN(),
235 "INF",
236 "NAN");
237
238 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
239 {
240 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
241 }
242
243 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
244 {
245 double_conversion::StringBuilder builder( buffer, size );
246 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
247 {
248 builder.Reset();
249 return 0;
250 }
251
252 builder.TrimTrailingZeros();
253 return builder.position();
254 }
255
256 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
257 {
258 double_conversion::StringBuilder builder( buffer, size );
259 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
260 {
261 builder.Reset();
262 return 0;
263 }
264
265 return builder.position();
266 }
267
268}

◆ ReadUInt64()

uint64_t FIX::double_conversion::ReadUInt64 ( Vector< const char > buffer,
int from,
int digits_to_read )
static

Definition at line 90 of file FieldConvertors.cpp.

◆ ReadUint64()

uint64_t FIX::double_conversion::ReadUint64 ( Vector< const char > buffer,
int * number_of_read_digits )
static

Definition at line 158 of file FieldConvertors.cpp.

188{
189
190// we include "double-conversion" project in FIX namespace
191// to avoid linking errors if quickfix is linked statically
192// and "double-conversion" is already used by target project
193
194#include "double-conversion/diy-fp.cc"
195#include "double-conversion/fixed-dtoa.cc"
196#include "double-conversion/bignum.cc"
197#include "double-conversion/bignum-dtoa.cc"
198#include "double-conversion/cached-powers.cc"
199#include "double-conversion/fast-dtoa.cc"
200#include "double-conversion/strtod.cc"
201#include "double-conversion/double-conversion.cc"
202
203 static double_conversion::DoubleToStringConverter g_dtoa_converter(
204 double_conversion::DoubleToStringConverter::NO_FLAGS,
205 "INF",
206 "NAN",
207 'e',
211 0);
212
213 static double_conversion::StringToDoubleConverter g_atod_converter(
214 double_conversion::StringToDoubleConverter::NO_FLAGS,
215 std::numeric_limits<double>::quiet_NaN(),
216 std::numeric_limits<double>::quiet_NaN(),
217 "INF",
218 "NAN");
219
220 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
221 {
222 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
223 }
224
225 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
226 {
227 double_conversion::StringBuilder builder( buffer, size );
228 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
229 {
230 builder.Reset();
231 return 0;
232 }
233
234 builder.TrimTrailingZeros();
235 return builder.position();
236 }
237
238 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
239 {
240 double_conversion::StringBuilder builder( buffer, size );
241 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
242 {
243 builder.Reset();
244 return 0;
245 }
246
247 return builder.position();
248 }
249
250}

◆ RoundWeed()

bool FIX::double_conversion::RoundWeed ( Vector< char > buffer,
int length,
uint64_t distance_too_high_w,
uint64_t unsafe_interval,
uint64_t rest,
uint64_t ten_kappa,
uint64_t unit )
static

Definition at line 61 of file FieldConvertors.cpp.

64 {
65 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
66 }
67
68 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
69 {
70 double_conversion::StringBuilder builder( buffer, size );
71 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
72 {
73 builder.Reset();
74 return 0;
75 }
76
77 builder.TrimTrailingZeros();
78 return builder.position();
79 }
80
81 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
82 {
83 double_conversion::StringBuilder builder( buffer, size );
84 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
85 {
86 builder.Reset();
87 return 0;
88 }
89
90 return builder.position();
91 }
92
93}

◆ RoundWeedCounted()

bool FIX::double_conversion::RoundWeedCounted ( Vector< char > buffer,
int length,
uint64_t rest,
uint64_t ten_kappa,
uint64_t unit,
int * kappa )
static

Definition at line 181 of file FieldConvertors.cpp.

211{
212
213// we include "double-conversion" project in FIX namespace
214// to avoid linking errors if quickfix is linked statically
215// and "double-conversion" is already used by target project
216
217#include "double-conversion/diy-fp.cc"
218#include "double-conversion/fixed-dtoa.cc"
219#include "double-conversion/bignum.cc"
220#include "double-conversion/bignum-dtoa.cc"
221#include "double-conversion/cached-powers.cc"
222#include "double-conversion/fast-dtoa.cc"
223#include "double-conversion/strtod.cc"
224#include "double-conversion/double-conversion.cc"
225
226 static double_conversion::DoubleToStringConverter g_dtoa_converter(
227 double_conversion::DoubleToStringConverter::NO_FLAGS,
228 "INF",
229 "NAN",
230 'e',
234 0);
235
236 static double_conversion::StringToDoubleConverter g_atod_converter(
237 double_conversion::StringToDoubleConverter::NO_FLAGS,
238 std::numeric_limits<double>::quiet_NaN(),
239 std::numeric_limits<double>::quiet_NaN(),
240 "INF",
241 "NAN");
242
243 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
244 {
245 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
246 }
247
248 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
249 {
250 double_conversion::StringBuilder builder( buffer, size );
251 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
252 {
253 builder.Reset();
254 return 0;
255 }
256
257 builder.TrimTrailingZeros();
258 return builder.position();
259 }
260
261 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
262 {
263 double_conversion::StringBuilder builder( buffer, size );
264 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
265 {
266 builder.Reset();
267 return 0;
268 }
269
270 return builder.position();
271 }
272
273}

◆ SignedZero()

double FIX::double_conversion::SignedZero ( bool sign)
static

Definition at line 495 of file FieldConvertors.cpp.

525{
526
527// we include "double-conversion" project in FIX namespace
528// to avoid linking errors if quickfix is linked statically
529// and "double-conversion" is already used by target project
530
531#include "double-conversion/diy-fp.cc"
532#include "double-conversion/fixed-dtoa.cc"
533#include "double-conversion/bignum.cc"
534#include "double-conversion/bignum-dtoa.cc"
535#include "double-conversion/cached-powers.cc"
536#include "double-conversion/fast-dtoa.cc"
537#include "double-conversion/strtod.cc"
538#include "double-conversion/double-conversion.cc"
539
540 static double_conversion::DoubleToStringConverter g_dtoa_converter(
541 double_conversion::DoubleToStringConverter::NO_FLAGS,
542 "INF",
543 "NAN",
544 'e',
548 0);
549
550 static double_conversion::StringToDoubleConverter g_atod_converter(
551 double_conversion::StringToDoubleConverter::NO_FLAGS,
552 std::numeric_limits<double>::quiet_NaN(),
553 std::numeric_limits<double>::quiet_NaN(),
554 "INF",
555 "NAN");
556
557 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
558 {
559 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
560 }
561
562 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
563 {
564 double_conversion::StringBuilder builder( buffer, size );
565 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
566 {
567 builder.Reset();
568 return 0;
569 }
570
571 builder.TrimTrailingZeros();
572 return builder.position();
573 }
574
575 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
576 {
577 double_conversion::StringBuilder builder( buffer, size );
578 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
579 {
580 builder.Reset();
581 return 0;
582 }
583
584 return builder.position();
585 }
586
587}

◆ SizeInHexChars()

template<typename S>
int FIX::double_conversion::SizeInHexChars ( S number)
static

Definition at line 554 of file FieldConvertors.cpp.

584{
585
586// we include "double-conversion" project in FIX namespace
587// to avoid linking errors if quickfix is linked statically
588// and "double-conversion" is already used by target project
589
590#include "double-conversion/diy-fp.cc"
591#include "double-conversion/fixed-dtoa.cc"
592#include "double-conversion/bignum.cc"
593#include "double-conversion/bignum-dtoa.cc"
594#include "double-conversion/cached-powers.cc"
595#include "double-conversion/fast-dtoa.cc"
596#include "double-conversion/strtod.cc"
597#include "double-conversion/double-conversion.cc"
598
599 static double_conversion::DoubleToStringConverter g_dtoa_converter(
600 double_conversion::DoubleToStringConverter::NO_FLAGS,
601 "INF",
602 "NAN",
603 'e',
607 0);
608
609 static double_conversion::StringToDoubleConverter g_atod_converter(
610 double_conversion::StringToDoubleConverter::NO_FLAGS,
611 std::numeric_limits<double>::quiet_NaN(),
612 std::numeric_limits<double>::quiet_NaN(),
613 "INF",
614 "NAN");
615
616 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
617 {
618 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
619 }
620
621 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
622 {
623 double_conversion::StringBuilder builder( buffer, size );
624 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
625 {
626 builder.Reset();
627 return 0;
628 }
629
630 builder.TrimTrailingZeros();
631 return builder.position();
632 }
633
634 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
635 {
636 double_conversion::StringBuilder builder( buffer, size );
637 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
638 {
639 builder.Reset();
640 return 0;
641 }
642
643 return builder.position();
644 }
645
646}

◆ Strtod()

double FIX::double_conversion::Strtod ( Vector< const char > buffer,
int exponent )

Definition at line 450 of file FieldConvertors.cpp.

480{
481
482// we include "double-conversion" project in FIX namespace
483// to avoid linking errors if quickfix is linked statically
484// and "double-conversion" is already used by target project
485
486#include "double-conversion/diy-fp.cc"
487#include "double-conversion/fixed-dtoa.cc"
488#include "double-conversion/bignum.cc"
489#include "double-conversion/bignum-dtoa.cc"
490#include "double-conversion/cached-powers.cc"
491#include "double-conversion/fast-dtoa.cc"
492#include "double-conversion/strtod.cc"
493#include "double-conversion/double-conversion.cc"
494
495 static double_conversion::DoubleToStringConverter g_dtoa_converter(
496 double_conversion::DoubleToStringConverter::NO_FLAGS,
497 "INF",
498 "NAN",
499 'e',
503 0);
504
505 static double_conversion::StringToDoubleConverter g_atod_converter(
506 double_conversion::StringToDoubleConverter::NO_FLAGS,
507 std::numeric_limits<double>::quiet_NaN(),
508 std::numeric_limits<double>::quiet_NaN(),
509 "INF",
510 "NAN");
511
512 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
513 {
514 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
515 }
516
517 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
518 {
519 double_conversion::StringBuilder builder( buffer, size );
520 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
521 {
522 builder.Reset();
523 return 0;
524 }
525
526 builder.TrimTrailingZeros();
527 return builder.position();
528 }
529
530 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
531 {
532 double_conversion::StringBuilder builder( buffer, size );
533 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
534 {
535 builder.Reset();
536 return 0;
537 }
538
539 return builder.position();
540 }
541
542}

◆ Strtof()

float FIX::double_conversion::Strtof ( Vector< const char > buffer,
int exponent )

Definition at line 476 of file FieldConvertors.cpp.

506{
507
508// we include "double-conversion" project in FIX namespace
509// to avoid linking errors if quickfix is linked statically
510// and "double-conversion" is already used by target project
511
512#include "double-conversion/diy-fp.cc"
513#include "double-conversion/fixed-dtoa.cc"
514#include "double-conversion/bignum.cc"
515#include "double-conversion/bignum-dtoa.cc"
516#include "double-conversion/cached-powers.cc"
517#include "double-conversion/fast-dtoa.cc"
518#include "double-conversion/strtod.cc"
519#include "double-conversion/double-conversion.cc"
520
521 static double_conversion::DoubleToStringConverter g_dtoa_converter(
522 double_conversion::DoubleToStringConverter::NO_FLAGS,
523 "INF",
524 "NAN",
525 'e',
529 0);
530
531 static double_conversion::StringToDoubleConverter g_atod_converter(
532 double_conversion::StringToDoubleConverter::NO_FLAGS,
533 std::numeric_limits<double>::quiet_NaN(),
534 std::numeric_limits<double>::quiet_NaN(),
535 "INF",
536 "NAN");
537
538 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
539 {
540 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
541 }
542
543 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
544 {
545 double_conversion::StringBuilder builder( buffer, size );
546 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
547 {
548 builder.Reset();
549 return 0;
550 }
551
552 builder.TrimTrailingZeros();
553 return builder.position();
554 }
555
556 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
557 {
558 double_conversion::StringBuilder builder( buffer, size );
559 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
560 {
561 builder.Reset();
562 return 0;
563 }
564
565 return builder.position();
566 }
567
568}

◆ TrimAndCut()

void FIX::double_conversion::TrimAndCut ( Vector< const char > buffer,
int exponent,
char * buffer_copy_space,
int space_size,
Vector< const char > * trimmed,
int * updated_exponent )
static

Definition at line 133 of file FieldConvertors.cpp.

163{
164
165// we include "double-conversion" project in FIX namespace
166// to avoid linking errors if quickfix is linked statically
167// and "double-conversion" is already used by target project
168
169#include "double-conversion/diy-fp.cc"
170#include "double-conversion/fixed-dtoa.cc"
171#include "double-conversion/bignum.cc"
172#include "double-conversion/bignum-dtoa.cc"
173#include "double-conversion/cached-powers.cc"
174#include "double-conversion/fast-dtoa.cc"
175#include "double-conversion/strtod.cc"
176#include "double-conversion/double-conversion.cc"
177
178 static double_conversion::DoubleToStringConverter g_dtoa_converter(
179 double_conversion::DoubleToStringConverter::NO_FLAGS,
180 "INF",
181 "NAN",
182 'e',
186 0);
187
188 static double_conversion::StringToDoubleConverter g_atod_converter(
189 double_conversion::StringToDoubleConverter::NO_FLAGS,
190 std::numeric_limits<double>::quiet_NaN(),
191 std::numeric_limits<double>::quiet_NaN(),
192 "INF",
193 "NAN");
194
195 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
196 {
197 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
198 }
199
200 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
201 {
202 double_conversion::StringBuilder builder( buffer, size );
203 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
204 {
205 builder.Reset();
206 return 0;
207 }
208
209 builder.TrimTrailingZeros();
210 return builder.position();
211 }
212
213 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
214 {
215 double_conversion::StringBuilder builder( buffer, size );
216 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
217 {
218 builder.Reset();
219 return 0;
220 }
221
222 return builder.position();
223 }
224
225}

◆ TrimLeadingZeros()

Vector< const char > FIX::double_conversion::TrimLeadingZeros ( Vector< const char > buffer)
static

Definition at line 91 of file FieldConvertors.cpp.

◆ TrimTrailingZeros()

Vector< const char > FIX::double_conversion::TrimTrailingZeros ( Vector< const char > buffer)
static

Definition at line 101 of file FieldConvertors.cpp.

131{
132
133// we include "double-conversion" project in FIX namespace
134// to avoid linking errors if quickfix is linked statically
135// and "double-conversion" is already used by target project
136
137#include "double-conversion/diy-fp.cc"
138#include "double-conversion/fixed-dtoa.cc"
139#include "double-conversion/bignum.cc"
140#include "double-conversion/bignum-dtoa.cc"
141#include "double-conversion/cached-powers.cc"
142#include "double-conversion/fast-dtoa.cc"
143#include "double-conversion/strtod.cc"
144#include "double-conversion/double-conversion.cc"
145
146 static double_conversion::DoubleToStringConverter g_dtoa_converter(
147 double_conversion::DoubleToStringConverter::NO_FLAGS,
148 "INF",
149 "NAN",
150 'e',
154 0);
155
156 static double_conversion::StringToDoubleConverter g_atod_converter(
157 double_conversion::StringToDoubleConverter::NO_FLAGS,
158 std::numeric_limits<double>::quiet_NaN(),
159 std::numeric_limits<double>::quiet_NaN(),
160 "INF",
161 "NAN");
162
163 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
164 {
165 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
166 }
167
168 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
169 {
170 double_conversion::StringBuilder builder( buffer, size );
171 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
172 {
173 builder.Reset();
174 return 0;
175 }
176
177 builder.TrimTrailingZeros();
178 return builder.position();
179 }
180
181 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
182 {
183 double_conversion::StringBuilder builder( buffer, size );
184 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
185 {
186 builder.Reset();
187 return 0;
188 }
189
190 return builder.position();
191 }
192
193}

◆ uint32_to_float()

float FIX::double_conversion::uint32_to_float ( uint32_t d32)
static

Definition at line 39 of file FieldConvertors.cpp.

◆ uint64_to_double()

double FIX::double_conversion::uint64_to_double ( uint64_t d64)
static

Definition at line 37 of file FieldConvertors.cpp.

Variable Documentation

◆ exact_powers_of_ten

const double FIX::double_conversion::exact_powers_of_ten[]
static
Initial value:
= {
1.0,
10.0,
100.0,
1000.0,
10000.0,
100000.0,
1000000.0,
10000000.0,
100000000.0,
1000000000.0,
10000000000.0,
100000000000.0,
1000000000000.0,
10000000000000.0,
100000000000000.0,
1000000000000000.0,
10000000000000000.0,
100000000000000000.0,
1000000000000000000.0,
10000000000000000000.0,
100000000000000000000.0,
1000000000000000000000.0,
10000000000000000000000.0
}

Definition at line 58 of file FieldConvertors.cpp.

64 {
65 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
66 }
67
68 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
69 {
70 double_conversion::StringBuilder builder( buffer, size );
71 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
72 {
73 builder.Reset();
74 return 0;
75 }
76
77 builder.TrimTrailingZeros();
78 return builder.position();
79 }
80
81 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
82 {
83 double_conversion::StringBuilder builder( buffer, size );

◆ kCachedPowers

const CachedPower FIX::double_conversion::kCachedPowers[]
static

Definition at line 44 of file FieldConvertors.cpp.

64 {
65 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
66 }
67
68 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
69 {
70 double_conversion::StringBuilder builder( buffer, size );
71 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
72 {
73 builder.Reset();
74 return 0;
75 }
76
77 builder.TrimTrailingZeros();
78 return builder.position();
79 }
80
81 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
82 {
83 double_conversion::StringBuilder builder( buffer, size );
84 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
85 {
86 builder.Reset();
87 return 0;
88 }
89
90 return builder.position();
91 }
92
93}

◆ kCachedPowersLength

const int FIX::double_conversion::kCachedPowersLength = ARRAY_SIZE(kCachedPowers)
static

Definition at line 134 of file FieldConvertors.cpp.

◆ kCachedPowersOffset

const int FIX::double_conversion::kCachedPowersOffset = 348
static

Definition at line 135 of file FieldConvertors.cpp.

◆ kD_1_LOG2_10

const double FIX::double_conversion::kD_1_LOG2_10 = 0.30102999566398114
static

Definition at line 136 of file FieldConvertors.cpp.

◆ kExactPowersOfTenSize

const int FIX::double_conversion::kExactPowersOfTenSize = ARRAY_SIZE(exact_powers_of_ten)
static

Definition at line 84 of file FieldConvertors.cpp.

◆ kFastDtoaMaximalLength

const int FIX::double_conversion::kFastDtoaMaximalLength = 17
static

Definition at line 50 of file FieldConvertors.cpp.

◆ kFastDtoaMaximalSingleLength

const int FIX::double_conversion::kFastDtoaMaximalSingleLength = 9
static

Definition at line 52 of file FieldConvertors.cpp.

◆ kMaxDecimalPower

const int FIX::double_conversion::kMaxDecimalPower = 309
static

Definition at line 51 of file FieldConvertors.cpp.

◆ kMaxExactDoubleIntegerDecimalDigits

const int FIX::double_conversion::kMaxExactDoubleIntegerDecimalDigits = 15
static

Definition at line 41 of file FieldConvertors.cpp.

◆ kMaximalTargetExponent

const int FIX::double_conversion::kMaximalTargetExponent = -32
static

Definition at line 43 of file FieldConvertors.cpp.

◆ kMaxSignificantDecimalDigits

const int FIX::double_conversion::kMaxSignificantDecimalDigits = 780
static

Definition at line 89 of file FieldConvertors.cpp.

◆ kMaxSignificantDigits

const int FIX::double_conversion::kMaxSignificantDigits = 772

Definition at line 443 of file FieldConvertors.cpp.

◆ kMaxUint64

const uint64_t FIX::double_conversion::kMaxUint64 = UINT64_2PART_C(0xFFFFFFFF, FFFFFFFF)
static

Definition at line 55 of file FieldConvertors.cpp.

◆ kMaxUint64DecimalDigits

const int FIX::double_conversion::kMaxUint64DecimalDigits = 19
static

Definition at line 43 of file FieldConvertors.cpp.

◆ kMinDecimalPower

const int FIX::double_conversion::kMinDecimalPower = -324
static

Definition at line 52 of file FieldConvertors.cpp.

◆ kMinimalTargetExponent

const int FIX::double_conversion::kMinimalTargetExponent = -60
static

Definition at line 42 of file FieldConvertors.cpp.

◆ kSmallPowersOfTen

unsigned int const FIX::double_conversion::kSmallPowersOfTen[]
static
Initial value:
=
{0, 1, 10, 100, 1000, 10000, 100000, 1000000, 10000000, 100000000,
1000000000}

Definition at line 236 of file FieldConvertors.cpp.

266{
267
268// we include "double-conversion" project in FIX namespace
269// to avoid linking errors if quickfix is linked statically
270// and "double-conversion" is already used by target project
271
272#include "double-conversion/diy-fp.cc"
273#include "double-conversion/fixed-dtoa.cc"
274#include "double-conversion/bignum.cc"
275#include "double-conversion/bignum-dtoa.cc"
276#include "double-conversion/cached-powers.cc"
277#include "double-conversion/fast-dtoa.cc"
278#include "double-conversion/strtod.cc"
279#include "double-conversion/double-conversion.cc"
280
281 static double_conversion::DoubleToStringConverter g_dtoa_converter(
282 double_conversion::DoubleToStringConverter::NO_FLAGS,
283 "INF",
284 "NAN",
285 'e',
289 0);
290
291 static double_conversion::StringToDoubleConverter g_atod_converter(
292 double_conversion::StringToDoubleConverter::NO_FLAGS,
293 std::numeric_limits<double>::quiet_NaN(),
294 std::numeric_limits<double>::quiet_NaN(),
295 "INF",
296 "NAN");
297
298 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
299 {
300 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
301 }
302
303 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
304 {
305 double_conversion::StringBuilder builder( buffer, size );
306 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
307 {
308 builder.Reset();
309 return 0;
310 }
311
312 builder.TrimTrailingZeros();
313 return builder.position();
314 }
315
316 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
317 {
318 double_conversion::StringBuilder builder( buffer, size );
319 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
320 {
321 builder.Reset();
322 return 0;
323 }
324
325 return builder.position();
326 }
327
328}

◆ kWhitespaceTable16

const uc16 FIX::double_conversion::kWhitespaceTable16[]
static
Initial value:
= {
160, 8232, 8233, 5760, 6158, 8192, 8193, 8194, 8195,
8196, 8197, 8198, 8199, 8200, 8201, 8202, 8239, 8287, 12288, 65279
}

Definition at line 450 of file FieldConvertors.cpp.

480{
481
482// we include "double-conversion" project in FIX namespace
483// to avoid linking errors if quickfix is linked statically
484// and "double-conversion" is already used by target project
485
486#include "double-conversion/diy-fp.cc"
487#include "double-conversion/fixed-dtoa.cc"
488#include "double-conversion/bignum.cc"
489#include "double-conversion/bignum-dtoa.cc"
490#include "double-conversion/cached-powers.cc"
491#include "double-conversion/fast-dtoa.cc"
492#include "double-conversion/strtod.cc"
493#include "double-conversion/double-conversion.cc"
494
495 static double_conversion::DoubleToStringConverter g_dtoa_converter(
496 double_conversion::DoubleToStringConverter::NO_FLAGS,
497 "INF",
498 "NAN",
499 'e',
503 0);
504
505 static double_conversion::StringToDoubleConverter g_atod_converter(
506 double_conversion::StringToDoubleConverter::NO_FLAGS,
507 std::numeric_limits<double>::quiet_NaN(),
508 std::numeric_limits<double>::quiet_NaN(),
509 "INF",
510 "NAN");
511
512 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
513 {
514 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
515 }
516
517 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
518 {
519 double_conversion::StringBuilder builder( buffer, size );
520 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
521 {
522 builder.Reset();
523 return 0;
524 }
525
526 builder.TrimTrailingZeros();
527 return builder.position();
528 }
529
530 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
531 {
532 double_conversion::StringBuilder builder( buffer, size );
533 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
534 {
535 builder.Reset();
536 return 0;
537 }
538
539 return builder.position();
540 }
541
542}

◆ kWhitespaceTable16Length

const int FIX::double_conversion::kWhitespaceTable16Length = ARRAY_SIZE(kWhitespaceTable16)
static

Definition at line 454 of file FieldConvertors.cpp.

◆ kWhitespaceTable7

const char FIX::double_conversion::kWhitespaceTable7[] = { 32, 13, 10, 9, 11, 12 }
static

Definition at line 446 of file FieldConvertors.cpp.

476{
477
478// we include "double-conversion" project in FIX namespace
479// to avoid linking errors if quickfix is linked statically
480// and "double-conversion" is already used by target project
481
482#include "double-conversion/diy-fp.cc"
483#include "double-conversion/fixed-dtoa.cc"
484#include "double-conversion/bignum.cc"
485#include "double-conversion/bignum-dtoa.cc"
486#include "double-conversion/cached-powers.cc"
487#include "double-conversion/fast-dtoa.cc"
488#include "double-conversion/strtod.cc"
489#include "double-conversion/double-conversion.cc"
490
491 static double_conversion::DoubleToStringConverter g_dtoa_converter(
492 double_conversion::DoubleToStringConverter::NO_FLAGS,
493 "INF",
494 "NAN",
495 'e',
499 0);
500
501 static double_conversion::StringToDoubleConverter g_atod_converter(
502 double_conversion::StringToDoubleConverter::NO_FLAGS,
503 std::numeric_limits<double>::quiet_NaN(),
504 std::numeric_limits<double>::quiet_NaN(),
505 "INF",
506 "NAN");
507
508 double DoubleConvertor::fast_strtod( const char * buffer, int size, int * processed_chars )
509 {
510 return g_atod_converter.StringToDouble( buffer, size, processed_chars );
511 }
512
513 int DoubleConvertor::fast_dtoa( char * buffer, int size, double value )
514 {
515 double_conversion::StringBuilder builder( buffer, size );
516 if( !g_dtoa_converter.ToPrecision( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
517 {
518 builder.Reset();
519 return 0;
520 }
521
522 builder.TrimTrailingZeros();
523 return builder.position();
524 }
525
526 int DoubleConvertor::fast_fixed_dtoa( char * buffer, int size, double value )
527 {
528 double_conversion::StringBuilder builder( buffer, size );
529 if( !g_dtoa_converter.ToFixed( value, DoubleConvertor::SIGNIFICANT_DIGITS, &builder ) )
530 {
531 builder.Reset();
532 return 0;
533 }
534
535 return builder.position();
536 }
537
538}

◆ kWhitespaceTable7Length

const int FIX::double_conversion::kWhitespaceTable7Length = ARRAY_SIZE(kWhitespaceTable7)
static

Definition at line 447 of file FieldConvertors.cpp.


Generated on for QuickFIX by doxygen 1.15.0 written by Dimitri van Heesch, © 1997-2001