/** \file QDecQuad.cc * Definitions for the class QDecQuad. * * (C) Copyright by Semih Cemiloglu * All rights reserved, see COPYRIGHT file for details. * * $Id: QDecQuad.cc 111 2006-06-19 03:45:40Z semihc $ * * */ #include "QDecQuad.hh" extern "C" { #include "decimal128.h" } #include #include #include "QDecNumber.hh" #include "QDecPacked.hh" #include "QDecDouble.hh" QDecQuad& QDecQuad::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); } QDecQuad& QDecQuad::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