ttmath/ttmath
Tomasz Sowa bb2583649e added: to Big<> class: support for NaN flag (Not a Number)
bool Big::IsNan() - returns true if the NaN flag is set
       void Big::SetNan() - sets the NaN flag
       The NaN flag is set by default after creating an object:
         Big<1, 2> a;    // NaN is set (it means the object has not a valid number)
         std::cout << a; // cout gives "NaN"
         a = 123;        // now NaN is not set
         std::cout << a; // cout gives "123"
       The NaN is set if there was a carry during calculations
         a.Mul(very_big_value); // a will have a NaN set
	   The NaN is set if an argument is NaN too
	     b.SetNan();
	     a.Add(b);  // a will have NaN because b has NaN too
       If you try to do something on a NaN object, the result is a NaN too
         a.SetNan();
         a.Add(2);  // a is still a NaN 
       The NaN is set if you use incorrect arguments
         a.Ln(-10); // a will have the NaN flag
       The only way to clear the NaN flag is to assign a correct value or other correct object
         supposing 'a' has NaN flag, to remove the flag you can either:
         a = 10;
         a.FromInt(30);
         a.SetOne(); 
         a.FromBig(other_object_without_nan);
         etc.
changed: renamed macro CONSTANTSGENERATOR to TTMATH_CONSTANTSGENERATOR



git-svn-id: svn://ttmath.org/publicrep/ttmath/trunk@152 e52654a7-88a9-db11-a3e9-0013d4bc506e
2009-05-26 23:13:22 +00:00
..
ttmath.h added: to Big<> class: support for NaN flag (Not a Number) 2009-05-26 23:13:22 +00:00
ttmathbig.h added: to Big<> class: support for NaN flag (Not a Number) 2009-05-26 23:13:22 +00:00
ttmathint.h added: UInt::PrintLog(const char * msg, std::ostream & output) 2009-05-01 14:53:21 +00:00
ttmathobjects.h added: Objects::IsDefined(const std::string & name) 2009-04-02 05:21:49 +00:00
ttmathparser.h fixed: Big::Mod(x) didn't correctly return a carry 2009-05-11 01:50:00 +00:00
ttmathtypes.h added: uint UInt::Mul3(const UInt<value_size> & ss2) 2009-05-15 22:27:04 +00:00
ttmathuint.h added: uint UInt::Mul3(const UInt<value_size> & ss2) 2009-05-15 22:27:04 +00:00
ttmathuint_noasm.h added: uint UInt::Mul3(const UInt<value_size> & ss2) 2009-05-15 22:27:04 +00:00
ttmathuint_x86.h added: to Big<> class: support for NaN flag (Not a Number) 2009-05-26 23:13:22 +00:00
ttmathuint_x86_64.h added: to Big<> class: support for NaN flag (Not a Number) 2009-05-26 23:13:22 +00:00