Museum

Home

Lab Overview

Retrotechnology Articles

⇒ Online Manual

Media Vault

Software Library

Restoration Projects

Artifacts Sought

FPP_$INTRO                        Domain/OS                         FPP_$INTRO


NAME
     intro - the Domain/OS Floating-Point Package

SYNOPSIS (C)
     #include <apollo/base.h>
     #include <apollo/fpp.h>

SYNOPSIS (Pascal)
     %include '/sys/ins/base.ins.pas';
     %include '/sys/ins/fpp.ins.pas';

SYNOPSIS (FORTRAN)
     %include '/sys/ins/base.ins.ftn'
     %include '/sys/ins/fpp.ins.ftn'

DESCRIPTION
     The Floating-Point Package (fpp_$) calls are an application program
     interface to the floating-point unit.

     The following is a list of the fpp_$ calls.

      fpp_$control                      modify the floating-point control
                                        register
      fpp_$dp_infinity                  return double-precision infinity
      fpp_$dp_max_normal                return maximum positive normalized
                                        double-precision value
      fpp_$dp_max_subnormal             return maximum positive denormalized
                                        double-precision value
      fpp_$dp_min_normal                return minimum positive normalized
                                        double-precision value
      fpp_$dp_min_subnormal             return minimum positive denormalized
                                        double-precision value
      fpp_$dp_quiet_nan                 return double-precision quiet NaN
      fpp_$dp_signaling_nan             return double-precision signaling NaN
      fpp_$get_accrued_exceptions       read accrued exception status
      fpp_$get_ieee_underflow_mode      report the underflow mode
      fpp_$get_mc68881_precision_mode   report the precision mode
      fpp_$get_rounding_mode            report the current rounding mode
      fpp_$get_trap_enables             report enabled floating-point excep-
                                        tion traps
      fpp_$restore                      load a new floating-point state
      fpp_$save                         save the floating-point state
      fpp_$save_restore                 save the current and load a new
                                        floating-point state
      fpp_$save_restore_size            return the size of a floating-point
                                        state
      fpp_$set_accrued_exceptions       set accrued exception status
      fpp_$set_default_modes            restore default floating-point modes
      fpp_$set_ieee_underflow_mode      set the underflow mode
      fpp_$set_mc68881_precision_mode   set the precision mode
      fpp_$set_rounding_mode            set the rounding mode
      fpp_$set_trap_enables             set floating-point exception traps
      fpp_$sp_infinity                  return single-precision infinity
      fpp_$sp_max_normal                return maximum positive normalized
                                        single-precision value
      fpp_$sp_max_subnormal             return maximum positive denormalized
                                        single-precision value
      fpp_$sp_min_normal                return minimum positive normalized
                                        single-precision value
      fpp_$sp_min_subnormal             return minimum positive denormalized
                                        single-precision value
      fpp_$sp_quiet_nan                 return single-precision quiet NaN
      fpp_$sp_signaling_nan             return single-precision signaling NaN
      fpp_$status                       modify the floating-point status
                                        register

     All fpp_$ calls may be made on any machine type running an operating sys-
     tem released after SR10, though they may return
     fpp_$unsupported_operation.  For example, the following calls will always
     return with a completion status of fpp_$unsupported_operation when called
     on DN300s or machines lacking floating-point hardware or equipped with
     only the Peripheral Enhancement Board floating-point unit:

          fpp_$control,
          fpp_$get_accrued_exceptions,
          fpp_$get_ieee_underflow_mode,
          fpp_$get_mc68881_precision_mode,
          fpp_$get_rounding_mode,
          fpp_$get_trap_enables,
          fpp_$set_accrued_exceptions,
          fpp_$set_default_modes,
          fpp_$set_ieee_underflow_mode,
          fpp_$set_mc68881_precision_mode,
          fpp_$set_rounding_mode,
          fpp_$set_trap_enables,
          fpp_$status.

     Furthermore, fpp_$set_ieee_underflow_mode will return with a completion
     status of fpp_$unsupported_operation if called on a machine equipped with
     a Motorola 68881 or FPX floating-point unit, and
     fpp_$get_mc68881_precision_mode and fpp_$set_mc68881_precision_mode will
     return with a completion status of fpp_$unsupported_operation if called
     on a DN10000 series machine.  Fpp_$ calls that do not return with a com-
     pletion status of status_$ok do not effect the machine's floating-point
     state.

   Data Types
     fpp_$accumulated_status_t
          A small set type for specifying accrued floating-point exceptions.
          It can take any combination of the following values:

          fpp_$divide_by_zero
               A divide-by-zero exception.

          fpp_$inexact
               An inexact operation exception.

          fpp_$invalid_operation
               An invalid operation exception.

          fpp_$overflow
               An overflow exception.

          fpp_$underflow
               An underflow exception.

     fpp_$mc68881_precision_mode_t
          An enumerated type for specifying a floating-point precision mode.
          It can take any one of the following values:

          fpp_$double_precision_mode
               Double precision mode.

          fpp_$extended_precision_mode
               Extended precision mode.  This is the default precision mode.

          fpp_$reserved_precision_mode
               Reserved.

          fpp_$single_precision_mode
               Single precision mode.

     fpp_$rounding_mode_t
          An enumerated type for specifying a floating-point rounding mode.
          It can take any one of the following values:

          fpp_$round_to_nearest
               Round to nearest representable value mode.  This is the default
               rounding mode.

          fpp_$round_to_negative
               Round to negative infinity (round down) mode.

          fpp_$round_to_positive
               Round to positive infinity (round up) mode.

          fpp_$round_to_zero
               Round toward 0 mode.

     fpp_$trap_enables_t
          A small set type for specifying floating-point exception traps.  It
          can take any combination of the following values:

          fpp_$enable_branch_unordered
               The branch on unordered comparison trap.

          fpp_$enable_divide_by_zero
               The divide by zero trap.

          fpp_$enable_inexact
               The inexact operation trap.

          fpp_$enable_invalid_operation
               The invalid operation trap.

          fpp_$enable_overflow
               The overflow trap.

          fpp_$enable_signaling_nan
               The operation on a signaling not-a-number trap.

          fpp_$enable_underflow
               The underflow trap.

     fpp_op_t
          An enumerated type for specifying the result of a fpp_$control or
          fpp_$status call.  It takes one of the following predefined values:

          read_op
               Read from a floating-point control or status register.

          write_op
               Write to a floating-point control or status register.

          exch_op
               Exchange the contents of a floating-point control or status
               register with the contents of an argument.

   Errors
     fpp_$undefined_operation
          The requested operation is undefined.

     fpp_$unsupported_operation
          The requested operation is not supported on the current hardware.




Typewritten Software • bear@typewritten.org • Edmonds, WA 98026