home *** CD-ROM | disk | FTP | other *** search
/ Programmer's ROM - The Computer Language Library / programmersrom.iso / ada / math / m36.abs < prev    next >
Encoding:
Text File  |  1988-05-03  |  2.7 KB  |  61 lines

  1. package MACHINE_ARITHMETIC_EMULATION is
  2. --  The purpose of this package is to emulate 36 bit machine
  3. --  arithmetic on a 32 bit host machine.  This package will
  4. --  provide support for 36 bit integer, real, and double
  5. --  precision real numbers in the form of the standard predefined
  6. --  arithmetic operations.  The ranges of the supported types
  7. --  are as follows:
  8. --
  9. --     Integer
  10. --        range of -2**35 to 2**35-1
  11. --     Real
  12. --        range of 10**-38 to 10**38 and 0
  13. --        mantissa => 27 bit binary fraction
  14. --        exponent => -128 to 127
  15. --     Double Precision Real
  16. --        range of 10**-38 to 10**38 and 0
  17. --        mantissa => 63 bit binary fraction
  18. --        exponent => -128 to 127
  19. --
  20. --  Any errors which occur during use of the arithmetic and
  21. --  boolean functions defined below will result in the
  22. --  raising of the exception "MAE_NUMERIC_ERROR".  The 
  23. --  exception declaration in the package specification can be
  24. --  changed to a rename of the predefined exception
  25. --  "NUMERIC_ERROR" for programs needing to handle arithmetic
  26. --  errors in a general fashion.
  27. --
  28. --  Conversion functions are provided to assist in programming
  29. --  mixed operand (32 and 36 bit) arithmetic, and to facilitate
  30. --  IO.  These functions should be renamed if they will be used
  31. --  extensively so that the impact on the readability of a
  32. --  program's arithmetic expressions is minimized.
  33. --
  34. --  The underlying arithmetic will be performed in twos
  35. --  complement arithmetic.
  36. --
  37.  
  38.    package TITLE_PAGE is new TITLE_PAGE_PACKAGE
  39.            (DEVELOPING_ORGANIZATION      => "SYSCON Corporation",
  40.             AUTHOR                       => "John Reddan",
  41.             CONTACT                      => "John Reddan",
  42.             ADDRESS                      => ("3990 Sherman Street",
  43.                                              "San Diego",
  44.                                              "CA","92110"),
  45.             PHONE                        => "(619) 296-0085",
  46.             DATE_SUBMITTED               => "(2,Jan,1985)");
  47.  
  48.    package TECHNICAL_PARAMETERS is new TECHNICAL_PARAMETERS_PACKAGE
  49.            (LINES_OF_SOURCE_CODE         => 1800,  -- estimate
  50.             DEVELOPMENT_COMPILER         => TeleSoft,
  51.             SUPPORTED_SYSTEMS            => "all 32 bit systems",
  52.             AUXILLIARY_FILES_SIZE        => (80*LINES_OF_SOURCE_CODE));
  53.  
  54.    package DEVELOPMENT_SCHEDULE_AND_STATUS is new SCHEDULE_PACKAGE
  55.            (COMPLETED_EVENTS             => null;
  56.             SCHEDULED_EVENTS             => ((PDR,(TBD)),
  57.                                              (CDR,(TBD)),
  58.                                              (DELIVERY,(1,Jul,1985)));
  59.  
  60. end MACHINE_ARITHMETIC_EMULATION;
  61.