fixed: in Big::FromDouble(double value) (32 bit version)
buffer overflow in referencing to UInt<2> (instead of m.table[2] should be m.table[0]) this was used when: E=0 and F is nonzero (double "unnormalized" values) it produced incorrect mantissa (on about 8th decimal digit up) git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@435 e52654a7-88a9-db11-a3e9-0013d4bc506e
This commit is contained in:
parent
6862321fad
commit
e58253a078
|
@ -5,7 +5,7 @@
|
|||
*/
|
||||
|
||||
/*
|
||||
* Copyright (c) 2006-2011, Tomasz Sowa
|
||||
* Copyright (c) 2006-2012, Tomasz Sowa
|
||||
* All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
|
@ -2644,7 +2644,7 @@ public:
|
|||
|
||||
FromDouble_SetExpAndMan((temp.u[1] & 0x80000000u) != 0,
|
||||
e - 1022 - man*TTMATH_BITS_PER_UINT + 1 - moved, 0,
|
||||
m.table[1], m.table[2]);
|
||||
m.table[1], m.table[0]);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue