一个大数运算类
#include < stdio.h > #include < math.h > #include < iostream > using namespace std; class decnum { friend decnum pow( const decnum & x, int n); friend decnum root( const decnum & x, int n); friend decnum div( const decnum & x, const decnum & y, decnum & r); friend decnum abs( const decnum & x); friend bool operator == ( const decnum & x, const decnum & y); friend bool operator != ( const decnum & x, const decnum & y); friend bool operator > ( const decnum & x, const decnum & y); friend bool operator < ( const decnum & x, const decnum & y); friend bool operator >= ( const decnum & x, const