/* number.h -- UMB Scheme, number interface.

UMB Scheme Interpreter  				$Revision: 1.1 $
Copyright (C) 1988, 1996 William R Campbell

This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.

UMB Scheme was written by Bill Campbell with help from Karl Berry,
Barbara Dixey, Ira Gerstein, Mary Glaser, Kathy Hargreaves, Bill McCabe,
Long Nguyen, Susan Quina, Jeyashree Sivasubram, Bela Sohoni, John Tam 
and Thang Quoc Tran.

For additional information about UMB Scheme, contact the author:

	Bill Campbell
	Department of Mathematics and Computer Science
	University of Massachusetts at Boston
	Harbor Campus
	Boston, MA 02125

	Telephone: 617-287-6449		Internet: bill@cs.umb.edu

*/

#define	Is_Fixnum(x)	(Get_Number_Tower_Position(x)==FIXNUM_LEVEL)
#define	Is_Bignum(x)	(Get_Number_Tower_Position(x)==BIGNUM_LEVEL)
#define	Is_Rational(x)	(Get_Number_Tower_Position(x)==RATIONAL_LEVEL)
#define	Is_Real(x)	(Get_Number_Tower_Position(x)==REAL_LEVEL)
#define	Is_Complex(x)	(Get_Number_Tower_Position(x)==COMPLEX_LEVEL)

#define MAX_CHARS_PER_INT	64



Import void 
	Is_Number_Zero(void), Is_Number_Positive(void), Is_Number_Negative(void),
        Is_Number_Odd(void), Is_Number_Even(void), Is_Number_Exact(void), 
	Is_Number_Inexact();

Import void
	Number_Less_Than(void), Number_Greater_Than(void), Number_Equal(void),
        Number_Less_Than_Or_Equal(void), Number_Greater_Than_Or_Equal(void);

Import void
	Number_Add(void), Number_Subtract(void), Number_Multiply(void),
        Number_Divide(void), Number_Quotient(void), Number_Remainder(void),
	Number_Modulo(void), Number_Negate(void), Number_Abs(void),
	Number_Numerator(void), Number_Denominator(void), Number_Rationalize(void);
		
Import void
	Number_Max(void), Number_Min(void), Number_GCD(void), Number_LCM(void);

Import void
	Number_Floor(void), Number_Ceiling(void), Number_Truncate(void), Number_Round(void);

Import void
	Number_Sqrt(void), Number_Exp(void), Number_Log(void), Number_Expt(void);

Import void
        Number_Sin(), Number_Cos(), Number_Tan(),
        Number_Asin(), Number_Acos(), Number_Atan(), Number_Atan2();

Import void
	Number_Exact_To_Inexact(void), Number_Inexact_To_Exact(void),
	Number_To_String(void), Cstring_To_Number(String, Integer);

Import	String	Integer_To_Cstring(Integer, String, Integer, Integer);

Import void
        Number_Make_Rectangular(), Number_Make_Polar(), 
        Number_Real_Part(), Number_Imaginary_Part(), 
        Number_Magnitude(), Number_Angle(); 


Import Integer	Number_To_Integer(Object);
Import void Integer_To_Number(Integer);

Import void Initialize_Number( void );
Import struct Object_Struct * Make_Bignum_Zero();

Import void Promote(Integer, Tower_Position);
Import void Demote(void);


Import Integer Number_Sign(Object);
