diff options
Diffstat (limited to 'src/uint256.h')
-rw-r--r-- | src/uint256.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/uint256.h b/src/uint256.h index eb0066fa27..8a9af8ba04 100644 --- a/src/uint256.h +++ b/src/uint256.h @@ -55,6 +55,16 @@ public: return ret; } + double getdouble() const + { + double ret = 0.0; + double fact = 1.0; + for (int i = 0; i < WIDTH; i++) { + ret += fact * pn[i]; + fact *= 4294967296.0; + } + return ret; + } base_uint& operator=(uint64 b) { |