unixdev.net


Switch to SpeakEasy.net DSL

The Modular Manual Browser

Home Page
Manual: (SunOS-4.1.3)
Page:
Section:
Apropos / Subsearch:
optional field

FLOATINGPOINT(3)           Library Functions Manual           FLOATINGPOINT(3)



NAME
       floatingpoint - IEEE floating point definitions

SYNOPSIS
       #include <&lt;sys/ieeefp.h>&gt;
       #include <&lt;floatingpoint.h>&gt;

DESCRIPTION
       This  file  defines  constants, types, variables, and functions used to
       implement standard floating point according to ANSI/IEEE Std  754-1985.
       The  variables  and  functions are implemented in libc.a.  The included
       file <&lt;sys/ieeefp.h>&gt; defines certain types of interest to the kernel.

       IEEE Rounding Modes:

       fp_direction_type   The type  of  the  IEEE  rounding  direction  mode.
                           Note:  the order of enumeration varies according to
                           hardware.

       fp_direction        The  IEEE  rounding  direction  mode  currently  in
                           force.   This is a global variable that is intended
                           to reflect the hardware state, so it should only be
                           written   indirectly   through   a   function  like
                           ieee_flags ("set","direction",...) that  also  sets
                           the hardware state.

       fp_precision_type   The type of the IEEE rounding precision mode, which
                           only applies on systems that support extended  pre-
                           cision such as Sun-3 systems with 68881's.

       fp_precision        The  IEEE  rounding  precision  mode  currently  in
                           force.  This is a global variable that is  intended
                           to  reflect  the  hardware  state  on  systems with
                           extended precision, so it should  only  be  written
                           indirectly      through     a     function     like
                           ieee_flags("set","precision",...).

       SIGFPE handling:

       sigfpe_code_type    The type of a SIGFPE code.

       sigfpe_handler_type The type of a user-definable SIGFPE exception  han-
                           dler called to handle a particular SIGFPE code.

       SIGFPE_DEFAULT      A  macro  indicating  the  default SIGFPE exception
                           handling, namely to perform the exception  handling
                           specified by calls to ieee_handler(3M), if any, and
                           otherwise to dump core using abort(3).

       SIGFPE_IGNORE       A macro indicating an  alternate  SIGFPE  exception
                           handling, namely to ignore and continue execution.

       SIGFPE_ABORT        A  macro  indicating  an alternate SIGFPE exception
                           handling, namely to abort with a core dump.

       IEEE Exception Handling:

       N_IEEE_EXCEPTION    The number of distinct IEEE  floating-point  excep-
                           tions.

       fp_exception_type   The  type of the N_IEEE_EXCEPTION exceptions.  Each
                           exception is given a bit number.

       fp_exception_field_type
                           The type intended to hold at least N_IEEE_EXCEPTION
                           bits  corresponding to the IEEE exceptions numbered
                           by fp_exception_type.  Thus fp_inexact  corresponds
                           to  the least significant bit and fp_invalid to the
                           fifth least significant bit.  Note: some operations
                           may set more than one exception.

       fp_accrued_exceptions
                           The  IEEE  exceptions  between the time this global
                           variable was last cleared,  and  the  last  time  a
                           function like ieee_flags("get","exception",...) was
                           called to update  the  variable  by  obtaining  the
                           hardware state.

       ieee_handlers       An  array  of  user-specifiable signal handlers for
                           use by the standard SIGFPE handler for IEEE  arith-
                           metic-related  SIGFPE  codes.   Since IEEE trapping
                           modes correspond to  hardware  modes,  elements  of
                           this  array should only be modified with a function
                           like ieee_handler(3M) that performs the appropriate
                           hardware  mode  update.   If  no sigfpe_handler has
                           been declared for a particular IEEE-related  SIGFPE
                           code,   then  the  related  ieee_handlers  will  be
                           invoked.

       IEEE Formats and Classification:

       single;extended     Definitions of IEEE formats.

       fp_class_type       An enumeration of the various classes of IEEE  val-
                           ues and symbols.

       IEEE Base Conversion:

              The  functions  described under floating_to_decimal(3) and deci-
              mal_to_floating(3) not only satisfy the IEEE Standard, but  also
              the stricter requirements of correct rounding for all arguments.

       DECIMAL_STRING_LENGTH
                           The length of a decimal_string.

       decimal_string      The digit buffer in a decimal_record.

       decimal_record      The  canonical  form  for  representing an unpacked
                           decimal floating-point number.

       decimal_form        The type used to specify fixed or  floating  binary
                           to decimal conversion.

       decimal_mode        A  struct  that contains specifications for conver-
                           sion between binary and decimal.

       decimal_string_form An enumeration of possible valid character  strings
                           representing floating-point numbers, infinities, or
                           NaNs.

SEE ALSO
       abort(3), decimal_to_floating(3), econvert(3),  floating_to_decimal(3),
       ieee_flags(3M), ieee_handler(3M), sigfpe(3), string_to_decimal(3), str-
       tod(3)



                                21 October 1987               FLOATINGPOINT(3)