fixed: Big::ToDouble(double &) set always +INF (infinity)
when the value was too large (even for negative values) (it should set -INF in such a case) added: some missing methods for converting for UInt<>, Int<> and Big<> classes: uint ToUInt() sint ToInt() ToUInt(uint32_t &) ToInt(uint32_t &) ToInt(int32_t &) ToUInt(uint64_t &) ToInt(uint64_t &) ToInt(int64_t &) FromUInt(uint32_t &) FromInt(uint32_t &) FromInt(int32_t &) FromUInt(uint64_t &) FromInt(uint64_t &) FromInt(int64_t &) and appropriate constructors and operators *** version for 64 bit platforms are not tested yet *** added: double Big::ToDouble() /there was only Big::ToDouble(double &) / uint Big::ToFloat(float &) float Big::ToFloat() git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@316 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
@@ -88,13 +88,13 @@ a = 123456.543456
|
||||
b = 98767878.124322
|
||||
a + b = 98891334.667778
|
||||
a - b = -98644421.580866
|
||||
a * b = 12193540837712.2708
|
||||
a * b = 12193540837712.27076
|
||||
a / b = 0.00124996654580957646
|
||||
Calculating with a carry
|
||||
a = 1.624801256066640878e+646457012
|
||||
a = 1.6248012560666408782e+646457012
|
||||
b = 456.319999999999993
|
||||
a + b = 1.624801256066640878e+646457012
|
||||
a - b = 1.624801256066640878e+646457012
|
||||
a + b = 1.6248012560666408782e+646457012
|
||||
a - b = 1.6248012560666408782e+646457012
|
||||
a * b = (carry)
|
||||
a / b = 3.560661939136222174e+646457009
|
||||
*/
|
||||
|
Reference in New Issue
Block a user