#pragma once #include "iAlgMath_global.h" // 定义大数 class I_ALGMATH_EXPORT zxHugeNum { public: zxHugeNum(); zxHugeNum(double dM, double dI = 0); zxHugeNum(const zxHugeNum& other); ~zxHugeNum(); bool operator == (const zxHugeNum &other) const; bool operator != (const zxHugeNum &other) const; zxHugeNum operator = (const zxHugeNum& other); zxHugeNum operator + (const zxHugeNum& other); zxHugeNum operator - (const zxHugeNum& other); zxHugeNum operator * (const zxHugeNum& other); zxHugeNum operator / (const zxHugeNum& other); zxHugeNum operator + (const double& d); zxHugeNum operator - (const double& d); zxHugeNum operator * (const double& d); zxHugeNum operator / (const double& d); public: double index() { return m_dIndex; } double multipler() { return m_dMultipler; } double total() { return m_dTotal; } bool isZero(); private: void makesureTotal(); private: double m_dIndex; //exp的次数 double m_dMultipler;//乘数 double m_dTotal; //合起来是 exp(m_dIndex) * m_dMultipler; };