/** \file QDecDouble.cc * Definitions for the class QDecDouble. * * (C) Copyright by Semih Cemiloglu * All rights reserved, see COPYRIGHT file for details. * * $Id$ * * */ #include "QDecDouble.hh" extern "C" { #include "decimal64.h" } #include #include #include "QDecNumber.hh" #include "QDecPacked.hh" #include "QDecSingle.hh" #include "QDecQuad.hh" QDecDouble& QDecDouble::fromDouble(double d) { char str[MaxStrSize] = { 0 }; #if defined(_MSC_VER) _snprintf(str, MaxStrSize, "%.*g", QDecNumDigits, d); #else snprintf(str, MaxStrSize, "%.*g", QDecNumDigits, d); #endif return fromString(str); } QDecDouble& QDecDouble::fromHexString(const char* str) { QByteArray ba = QByteArray::fromHex(str); int size = sizeof(m_data); char* p = (char*)&m_data; int i = 0; int j = size-1; for(; i