ln3 Method - IsNegative, IsPositive
Description
Determine if the large number is positive or negative. These functions are more efficient than comparing the large number to zero.
Signature
bool IsNegative( void ) const
bool IsPositive( void ) const
Parameters
( none )
Returns
( bool )
true
if the large number is negative (positive); false otherwise.
Example
If the value in the variable
X
is negative (strictly less than zero), then print the string
X < 0
:
ln X; ... if( X.IsNegative( ) ) cout << "X < 0" << endl;