// signum().

// General includes.
#include "cl_sysdep.h"

// Specification.
#include "cl_rational.h"


// Implementation.

#include "cl_RA.h"
#include "cl_I.h"

MAYBE_INLINE
cl_RA signum (const cl_RA& x)
{
	if (minusp(x)) { return -1; } // x<0 -> -1
	elif (zerop(x)) { return 0; } // x=0 -> 0
	else { return 1; } // x>0 -> +1
}
