// -*- C++ -*-
#define _NUMERIC_C_
#pragma implementation
/* [ec2 3.1.2.2]
 *
 *
 *
 * source file: /usr2/Src/eon/eiffel/3122/bibt/numeric.e
 *
 */

#ident "@(#)class_txt:numeric"
//
// Class: NUMERIC (#15), Cluster: "bibt"
// Version: 1.0.0.1, Built by: root, on: 09:14:24 Jan 23 1995
//
//
// Ancestor classes:
//
class COMPARABLE;

#include <numeric.H>

void* NUMERIC::_rev_cvt ( int _type)
{
   switch ( _type) {
      case 14: return (COMPARABLE*) this;
      case 16: return (ANY*) this;
      case 17: return (PLATFORM*) this;
      case 18: return (GENERAL*) this;
   }
   return (NUMERIC*) this;
}


NUMERIC* NUMERIC::_ert_cvt_to_class ( void *_v, int _type)
{
   NUMERIC* _tmp;

   switch ( _type) {
      case 14: _tmp = (NUMERIC*) ((COMPARABLE*)_v)->_BaseType ( 14); break;
      case 16: _tmp = (NUMERIC*) ((ANY*)_v)->_BaseType ( 16); break;
      case 17: _tmp = (NUMERIC*) ((PLATFORM*)_v)->_BaseType ( 17); break;
      case 18: _tmp = (NUMERIC*) ((GENERAL*)_v)->_BaseType ( 18); break;
      default: _tmp = (NUMERIC*) _v;
   }
   return _tmp;
}


NUMERIC::NUMERIC()
{
   _ert_expand++;
   _ert_expand--;
#ifdef NO_OPTIMISATION
   
#ifdef EIFFEL_ASSERT
   _class_assert = _set_class_assert ( 0x1f);
   _doing_invar = 0;
#endif // EIFFEL_ASSERT
#endif // NO_OPTIMISATION

   class_id = _ert_INTEGER_Const ( 15);
   _rescuing = 0;
   COMPARABLE::_base_id = class_id;
   ANY::_base_id = class_id;
   PLATFORM::_base_id = class_id;
   GENERAL::_base_id = class_id;
   c_object_address = (POINTER)this;
   c_class_name = (POINTER)"NUMERIC";
   bit_size = _ert_INTEGER_Const ( sizeof(*this) * BYTE_SIZE);
}
// answer with result of multipling `Current' by `other'
NUMERIC* NUMERIC::_INFIX_MUL ( NUMERIC* other)
{
   NUMERIC* result = (NUMERIC*) 0;
#ifdef NO_OPTIMISATION
#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s+++ NUMERIC._INFIX_MUL\n", (_ert_trace_depth++ * 3), "");
#endif // EIFFEL_TRACE

   _eiffel_rt_Assert( EXCEPT_NESTED_FUNCTIONS, "NUMERIC", "_INFIX_MUL", "env table size exceeded", (_ert_depth != _ERT_JMP_MAX - 1), (_ert_longjmp()));

#endif // NO_OPTIMISATION
   _ert_cenv[ _ert_depth].caddr = this;
   if ( setjmp ( _ert_cenv[ _ert_depth++].jmpenv)) {
      if ( _rescuing) {
         _rescuing--;
         _eiffel_rt_Assert ( 115, "NUMERIC", "_INFIX_MUL", "", false, (_ert_depth--,_ert_longjmp()));
      }
      goto _rescue;
   }

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT) && defined (EIFFEL_TRACE)
   if ( _class_assert) {
      if ( _doing_invar == 0)
         _enter_routine ( c_object_address, "NUMERIC", "Infix \"*\"", _make_arg_list ( "other", other, 15, (char *) 0));
      else
         _enter_routine ( c_object_address, "NUMERIC", "Infix \"*\"", _make_arg_list ( 0));
   }
#endif // EIFFEL_ASSERT && EIFFEL_TRACE
#endif // NO_OPTIMISATION

// Routine body "_INFIX_MUL"

   _eiffel_rt_Assert ( 109, "NUMERIC", "Infix \"*\"", "", false, (_ert_longjmp()));

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT)
#if defined (EA_INVARIANT)
   _class_invariant("_INFIX_MUL");

#endif // EA_INVARIANT

   if ( _class_assert)
      _leave_routine();
#endif // EIFFEL_ASSERT

#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s--- NUMERIC._INFIX_MUL\n", (--_ert_trace_depth * 3), "");
#endif // EIFFEL_TRACE
#endif // NO_OPTIMISATION
   _ert_depth--;

   return result;

_rescue:
   _rescuing++;

#ifdef EIFFEL_TRACE
   _ert_trace_log ( "NUMERIC", "Infix \"*\"", EXCEPT_FAIL, _ert_depth);
#endif

   if ( _class_assert)
      _leave_routine();

   _rescuing--;
   _eiffel_rt_Assert ( 106, "NUMERIC", "_INFIX_MUL", "", false, (_ert_depth--,_ert_longjmp()));
   return (NUMERIC*) 0;
}  // _INFIX_MUL

// answer with result of unary addition on `Current'
NUMERIC* NUMERIC::_PREFIX_ADDU()
{
   NUMERIC* result = (NUMERIC*) 0;
#ifdef NO_OPTIMISATION
#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s+++ NUMERIC._PREFIX_ADDU\n", (_ert_trace_depth++ * 3), "");
#endif // EIFFEL_TRACE

   _eiffel_rt_Assert( EXCEPT_NESTED_FUNCTIONS, "NUMERIC", "_PREFIX_ADDU", "env table size exceeded", (_ert_depth != _ERT_JMP_MAX - 1), (_ert_longjmp()));

#endif // NO_OPTIMISATION
   _ert_cenv[ _ert_depth].caddr = this;
   if ( setjmp ( _ert_cenv[ _ert_depth++].jmpenv)) {
      if ( _rescuing) {
         _rescuing--;
         _eiffel_rt_Assert ( 115, "NUMERIC", "_PREFIX_ADDU", "", false, (_ert_depth--,_ert_longjmp()));
      }
      goto _rescue;
   }

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT) && defined (EIFFEL_TRACE)
   if ( _class_assert) {
      if ( _doing_invar == 0)
         _enter_routine ( c_object_address, "NUMERIC", "Prefix \"+\"", _make_arg_list ( (char *) 0));
      else
         _enter_routine ( c_object_address, "NUMERIC", "Prefix \"+\"", _make_arg_list ( 0));
   }
#endif // EIFFEL_ASSERT && EIFFEL_TRACE
#endif // NO_OPTIMISATION

// Routine body "_PREFIX_ADDU"

   _eiffel_rt_Assert ( 109, "NUMERIC", "Prefix \"+\"", "", false, (_ert_longjmp()));

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT)
#if defined (EA_INVARIANT)
   _class_invariant("_PREFIX_ADDU");

#endif // EA_INVARIANT

   if ( _class_assert)
      _leave_routine();
#endif // EIFFEL_ASSERT

#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s--- NUMERIC._PREFIX_ADDU\n", (--_ert_trace_depth * 3), "");
#endif // EIFFEL_TRACE
#endif // NO_OPTIMISATION
   _ert_depth--;

   return result;

_rescue:
   _rescuing++;

#ifdef EIFFEL_TRACE
   _ert_trace_log ( "NUMERIC", "Prefix \"+\"", EXCEPT_FAIL, _ert_depth);
#endif

   if ( _class_assert)
      _leave_routine();

   _rescuing--;
   _eiffel_rt_Assert ( 106, "NUMERIC", "_PREFIX_ADDU", "", false, (_ert_depth--,_ert_longjmp()));
   return (NUMERIC*) 0;
}  // _PREFIX_ADDU

// answer with result of adding `Current' to `other'
NUMERIC* NUMERIC::_INFIX_ADDU ( NUMERIC* other)
{
   NUMERIC* result = (NUMERIC*) 0;
#ifdef NO_OPTIMISATION
#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s+++ NUMERIC._INFIX_ADDU\n", (_ert_trace_depth++ * 3), "");
#endif // EIFFEL_TRACE

   _eiffel_rt_Assert( EXCEPT_NESTED_FUNCTIONS, "NUMERIC", "_INFIX_ADDU", "env table size exceeded", (_ert_depth != _ERT_JMP_MAX - 1), (_ert_longjmp()));

#endif // NO_OPTIMISATION
   _ert_cenv[ _ert_depth].caddr = this;
   if ( setjmp ( _ert_cenv[ _ert_depth++].jmpenv)) {
      if ( _rescuing) {
         _rescuing--;
         _eiffel_rt_Assert ( 115, "NUMERIC", "_INFIX_ADDU", "", false, (_ert_depth--,_ert_longjmp()));
      }
      goto _rescue;
   }

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT) && defined (EIFFEL_TRACE)
   if ( _class_assert) {
      if ( _doing_invar == 0)
         _enter_routine ( c_object_address, "NUMERIC", "Infix \"+\"", _make_arg_list ( "other", other, 15, (char *) 0));
      else
         _enter_routine ( c_object_address, "NUMERIC", "Infix \"+\"", _make_arg_list ( 0));
   }
#endif // EIFFEL_ASSERT && EIFFEL_TRACE
#endif // NO_OPTIMISATION

// Routine body "_INFIX_ADDU"

   _eiffel_rt_Assert ( 109, "NUMERIC", "Infix \"+\"", "", false, (_ert_longjmp()));

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT)
#if defined (EA_INVARIANT)
   _class_invariant("_INFIX_ADDU");

#endif // EA_INVARIANT

   if ( _class_assert)
      _leave_routine();
#endif // EIFFEL_ASSERT

#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s--- NUMERIC._INFIX_ADDU\n", (--_ert_trace_depth * 3), "");
#endif // EIFFEL_TRACE
#endif // NO_OPTIMISATION
   _ert_depth--;

   return result;

_rescue:
   _rescuing++;

#ifdef EIFFEL_TRACE
   _ert_trace_log ( "NUMERIC", "Infix \"+\"", EXCEPT_FAIL, _ert_depth);
#endif

   if ( _class_assert)
      _leave_routine();

   _rescuing--;
   _eiffel_rt_Assert ( 106, "NUMERIC", "_INFIX_ADDU", "", false, (_ert_depth--,_ert_longjmp()));
   return (NUMERIC*) 0;
}  // _INFIX_ADDU

// answer with result of unary subtraction on `Current'
NUMERIC* NUMERIC::_PREFIX_SUBU()
{
   NUMERIC* result = (NUMERIC*) 0;
#ifdef NO_OPTIMISATION
#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s+++ NUMERIC._PREFIX_SUBU\n", (_ert_trace_depth++ * 3), "");
#endif // EIFFEL_TRACE

   _eiffel_rt_Assert( EXCEPT_NESTED_FUNCTIONS, "NUMERIC", "_PREFIX_SUBU", "env table size exceeded", (_ert_depth != _ERT_JMP_MAX - 1), (_ert_longjmp()));

#endif // NO_OPTIMISATION
   _ert_cenv[ _ert_depth].caddr = this;
   if ( setjmp ( _ert_cenv[ _ert_depth++].jmpenv)) {
      if ( _rescuing) {
         _rescuing--;
         _eiffel_rt_Assert ( 115, "NUMERIC", "_PREFIX_SUBU", "", false, (_ert_depth--,_ert_longjmp()));
      }
      goto _rescue;
   }

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT) && defined (EIFFEL_TRACE)
   if ( _class_assert) {
      if ( _doing_invar == 0)
         _enter_routine ( c_object_address, "NUMERIC", "Prefix \"-\"", _make_arg_list ( (char *) 0));
      else
         _enter_routine ( c_object_address, "NUMERIC", "Prefix \"-\"", _make_arg_list ( 0));
   }
#endif // EIFFEL_ASSERT && EIFFEL_TRACE
#endif // NO_OPTIMISATION

// Routine body "_PREFIX_SUBU"

   _eiffel_rt_Assert ( 109, "NUMERIC", "Prefix \"-\"", "", false, (_ert_longjmp()));

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT)
#if defined (EA_INVARIANT)
   _class_invariant("_PREFIX_SUBU");

#endif // EA_INVARIANT

   if ( _class_assert)
      _leave_routine();
#endif // EIFFEL_ASSERT

#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s--- NUMERIC._PREFIX_SUBU\n", (--_ert_trace_depth * 3), "");
#endif // EIFFEL_TRACE
#endif // NO_OPTIMISATION
   _ert_depth--;

   return result;

_rescue:
   _rescuing++;

#ifdef EIFFEL_TRACE
   _ert_trace_log ( "NUMERIC", "Prefix \"-\"", EXCEPT_FAIL, _ert_depth);
#endif

   if ( _class_assert)
      _leave_routine();

   _rescuing--;
   _eiffel_rt_Assert ( 106, "NUMERIC", "_PREFIX_SUBU", "", false, (_ert_depth--,_ert_longjmp()));
   return (NUMERIC*) 0;
}  // _PREFIX_SUBU

// answer with result of subtracting `Current' from `other'
NUMERIC* NUMERIC::_INFIX_SUBU ( NUMERIC* other)
{
   NUMERIC* result = (NUMERIC*) 0;
#ifdef NO_OPTIMISATION
#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s+++ NUMERIC._INFIX_SUBU\n", (_ert_trace_depth++ * 3), "");
#endif // EIFFEL_TRACE

   _eiffel_rt_Assert( EXCEPT_NESTED_FUNCTIONS, "NUMERIC", "_INFIX_SUBU", "env table size exceeded", (_ert_depth != _ERT_JMP_MAX - 1), (_ert_longjmp()));

#endif // NO_OPTIMISATION
   _ert_cenv[ _ert_depth].caddr = this;
   if ( setjmp ( _ert_cenv[ _ert_depth++].jmpenv)) {
      if ( _rescuing) {
         _rescuing--;
         _eiffel_rt_Assert ( 115, "NUMERIC", "_INFIX_SUBU", "", false, (_ert_depth--,_ert_longjmp()));
      }
      goto _rescue;
   }

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT) && defined (EIFFEL_TRACE)
   if ( _class_assert) {
      if ( _doing_invar == 0)
         _enter_routine ( c_object_address, "NUMERIC", "Infix \"-\"", _make_arg_list ( "other", other, 15, (char *) 0));
      else
         _enter_routine ( c_object_address, "NUMERIC", "Infix \"-\"", _make_arg_list ( 0));
   }
#endif // EIFFEL_ASSERT && EIFFEL_TRACE
#endif // NO_OPTIMISATION

// Routine body "_INFIX_SUBU"

   _eiffel_rt_Assert ( 109, "NUMERIC", "Infix \"-\"", "", false, (_ert_longjmp()));

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT)
#if defined (EA_INVARIANT)
   _class_invariant("_INFIX_SUBU");

#endif // EA_INVARIANT

   if ( _class_assert)
      _leave_routine();
#endif // EIFFEL_ASSERT

#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s--- NUMERIC._INFIX_SUBU\n", (--_ert_trace_depth * 3), "");
#endif // EIFFEL_TRACE
#endif // NO_OPTIMISATION
   _ert_depth--;

   return result;

_rescue:
   _rescuing++;

#ifdef EIFFEL_TRACE
   _ert_trace_log ( "NUMERIC", "Infix \"-\"", EXCEPT_FAIL, _ert_depth);
#endif

   if ( _class_assert)
      _leave_routine();

   _rescuing--;
   _eiffel_rt_Assert ( 106, "NUMERIC", "_INFIX_SUBU", "", false, (_ert_depth--,_ert_longjmp()));
   return (NUMERIC*) 0;
}  // _INFIX_SUBU

// answer with result of dividing `Current' by `other'
NUMERIC* NUMERIC::_INFIX_DIV ( NUMERIC* other)
{
   NUMERIC* result = (NUMERIC*) 0;
#ifdef NO_OPTIMISATION
#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s+++ NUMERIC._INFIX_DIV\n", (_ert_trace_depth++ * 3), "");
#endif // EIFFEL_TRACE

   _eiffel_rt_Assert( EXCEPT_NESTED_FUNCTIONS, "NUMERIC", "_INFIX_DIV", "env table size exceeded", (_ert_depth != _ERT_JMP_MAX - 1), (_ert_longjmp()));

#endif // NO_OPTIMISATION
   _ert_cenv[ _ert_depth].caddr = this;
   if ( setjmp ( _ert_cenv[ _ert_depth++].jmpenv)) {
      if ( _rescuing) {
         _rescuing--;
         _eiffel_rt_Assert ( 115, "NUMERIC", "_INFIX_DIV", "", false, (_ert_depth--,_ert_longjmp()));
      }
      goto _rescue;
   }

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT) && defined (EIFFEL_TRACE)
   if ( _class_assert) {
      if ( _doing_invar == 0)
         _enter_routine ( c_object_address, "NUMERIC", "Infix \"/\"", _make_arg_list ( "other", other, 15, (char *) 0));
      else
         _enter_routine ( c_object_address, "NUMERIC", "Infix \"/\"", _make_arg_list ( 0));
   }
#endif // EIFFEL_ASSERT && EIFFEL_TRACE
#endif // NO_OPTIMISATION

// Routine body "_INFIX_DIV"

   _eiffel_rt_Assert ( 109, "NUMERIC", "Infix \"/\"", "", false, (_ert_longjmp()));

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT)
#if defined (EA_INVARIANT)
   _class_invariant("_INFIX_DIV");

#endif // EA_INVARIANT

   if ( _class_assert)
      _leave_routine();
#endif // EIFFEL_ASSERT

#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s--- NUMERIC._INFIX_DIV\n", (--_ert_trace_depth * 3), "");
#endif // EIFFEL_TRACE
#endif // NO_OPTIMISATION
   _ert_depth--;

   return result;

_rescue:
   _rescuing++;

#ifdef EIFFEL_TRACE
   _ert_trace_log ( "NUMERIC", "Infix \"/\"", EXCEPT_FAIL, _ert_depth);
#endif

   if ( _class_assert)
      _leave_routine();

   _rescuing--;
   _eiffel_rt_Assert ( 106, "NUMERIC", "_INFIX_DIV", "", false, (_ert_depth--,_ert_longjmp()));
   return (NUMERIC*) 0;
}  // _INFIX_DIV

// answer with result of raising `Current' to the power of `other'
NUMERIC* NUMERIC::_INFIX_DIVPOW ( NUMERIC* other)
{
   NUMERIC* result = (NUMERIC*) 0;
#ifdef NO_OPTIMISATION
#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s+++ NUMERIC._INFIX_DIVPOW\n", (_ert_trace_depth++ * 3), "");
#endif // EIFFEL_TRACE

   _eiffel_rt_Assert( EXCEPT_NESTED_FUNCTIONS, "NUMERIC", "_INFIX_DIVPOW", "env table size exceeded", (_ert_depth != _ERT_JMP_MAX - 1), (_ert_longjmp()));

#endif // NO_OPTIMISATION
   _ert_cenv[ _ert_depth].caddr = this;
   if ( setjmp ( _ert_cenv[ _ert_depth++].jmpenv)) {
      if ( _rescuing) {
         _rescuing--;
         _eiffel_rt_Assert ( 115, "NUMERIC", "_INFIX_DIVPOW", "", false, (_ert_depth--,_ert_longjmp()));
      }
      goto _rescue;
   }

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT) && defined (EIFFEL_TRACE)
   if ( _class_assert) {
      if ( _doing_invar == 0)
         _enter_routine ( c_object_address, "NUMERIC", "Infix \"^\"", _make_arg_list ( "other", other, 15, (char *) 0));
      else
         _enter_routine ( c_object_address, "NUMERIC", "Infix \"^\"", _make_arg_list ( 0));
   }
#endif // EIFFEL_ASSERT && EIFFEL_TRACE
#endif // NO_OPTIMISATION

// Routine body "_INFIX_DIVPOW"

   _eiffel_rt_Assert ( 109, "NUMERIC", "Infix \"^\"", "", false, (_ert_longjmp()));

#ifdef NO_OPTIMISATION
#if defined (EIFFEL_ASSERT)
#if defined (EA_INVARIANT)
   _class_invariant("_INFIX_DIVPOW");

#endif // EA_INVARIANT

   if ( _class_assert)
      _leave_routine();
#endif // EIFFEL_ASSERT

#ifdef EIFFEL_TRACE
   if ( _ert_trace_mode)
      printf ( "%*s--- NUMERIC._INFIX_DIVPOW\n", (--_ert_trace_depth * 3), "");
#endif // EIFFEL_TRACE
#endif // NO_OPTIMISATION
   _ert_depth--;

   return result;

_rescue:
   _rescuing++;

#ifdef EIFFEL_TRACE
   _ert_trace_log ( "NUMERIC", "Infix \"^\"", EXCEPT_FAIL, _ert_depth);
#endif

   if ( _class_assert)
      _leave_routine();

   _rescuing--;
   _eiffel_rt_Assert ( 106, "NUMERIC", "_INFIX_DIVPOW", "", false, (_ert_depth--,_ert_longjmp()));
   return (NUMERIC*) 0;
}  // _INFIX_DIVPOW

#ifdef NO_OPTIMISATION

#if defined (EIFFEL_ASSERT) && defined (EA_INVARIANT)
void
NUMERIC::_class_invariant ( char* rtn)
{
   if ( _doing_invar++)
      return;

   if ( ! (_class_assert & 0x4))
      return;
   COMPARABLE::_class_invariant(rtn);
   _doing_invar = 0;

   return;
}
#endif // EIFFEL_ASSERT && EA_INVARIANT
#endif // NO_OPTIMISATION

void NUMERIC::_Copy( INTEGER deep, INTEGER sclass, NUMERIC* _arg)
{

   if ( deep) {
      COMPARABLE::_Copy ( 1, 0, _arg);
      if ( sclass) ANY::_Copy ( 1, 0, _arg);
      if ( sclass) PLATFORM::_Copy ( 1, 0, _arg);
      if ( sclass) GENERAL::_Copy ( 1, 0, _arg);
   }
}

NUMERIC* NUMERIC::_localClone( INTEGER deep, INTEGER sclass)
{
   NUMERIC* result;

   result = new NUMERIC;


   if ( deep) {
      COMPARABLE::_localClone (1, 0);
      if ( sclass) ANY::_localClone (1, 0);
      if ( sclass) PLATFORM::_localClone (1, 0);
      if ( sclass) GENERAL::_localClone (1, 0);
   }

   return result;
}

NUMERIC* NUMERIC::_Clone( INTEGER deep, INTEGER sclass, NUMERIC* _arg)
{
   NUMERIC* result;

   result = new NUMERIC;

   result->_Copy ( deep, sclass, _arg);

   return result;
}

BOOLEAN NUMERIC::_Equal ( INTEGER deep, INTEGER sclass, NUMERIC* _arg)
{

   if ( deep) {
      if ( COMPARABLE::_Equal ( 1, 0, _arg) == false) return false;
      if ( sclass) if ( ANY::_Equal ( 1, 0, _arg) == false) return false;
      if ( sclass) if ( PLATFORM::_Equal ( 1, 0, _arg) == false) return false;
      if ( sclass) if ( GENERAL::_Equal ( 1, 0, _arg) == false) return false;
   }

   return true;
}

BOOLEAN NUMERIC::_Conforms_to ( INTEGER other_id)
{
   INTEGER Parents[4] = { 14, 16, 17, 18}, i;

   if ( class_id == other_id)
      return true;

   for ( i = 0; i < 4; i++)
      if ( Parents[i] == (int)other_id)
         return true;

   return false;
}

void NUMERIC::_Add_gp ( )
{
   _gp_ids[0] = 0;
}

#ifdef NO_OPTIMISATION
NUMERIC *_NUMERIC_chk(NUMERIC *rtc, char *fname)
{
   if ( !rtc)
      _eiffel_rt_Assert ( 107, "NUMERIC", fname, "void target", 
			false, _ert_longjmp());
   return rtc;
}
#endif // NO_OPTIMISATION
   void NUMERIC::copy (NUMERIC* p1) { _Copy(0,1,p1); }
   void NUMERIC::deep_copy (NUMERIC* p1) { _Copy(1,1,p1); }
   NUMERIC* NUMERIC::clone (NUMERIC* p1) { return p1->_Clone(0,1,p1); }
   NUMERIC* NUMERIC::deep_clone (NUMERIC* p1) { return p1->_Clone(1,1,p1); }
   void NUMERIC::standard_copy (NUMERIC* p1) { _Copy(0,1,p1); }
   void NUMERIC::standard_deep_copy (NUMERIC* p1) { _Copy(1,1,p1); }
   NUMERIC* NUMERIC::standard_clone (NUMERIC* p1) { return p1->_Clone(0,1,p1); }
   NUMERIC* NUMERIC::standard_deep_clone (NUMERIC* p1) { return p1->_Clone(1,1,p1); }


