IEEE(3)                   NetBSD Programmer's Manual                   IEEE(3)

NNAAMMEE
     ccooppyyssiiggnn, ffiinniittee, iillooggbb, nneexxttaafftteerr, rreemmaaiinnddeerr, ssccaallbbnn - Functions for
     IEEE arithmetic

SSYYNNOOPPSSIISS
     ##iinncclluuddee <<mmaatthh..hh>>

     _d_o_u_b_l_e
     ccooppyyssiiggnn(_d_o_u_b_l_e _x, _d_o_u_b_l_e _y)

     _i_n_t
     ffiinniittee(_d_o_u_b_l_e _x)

     _i_n_t
     iillooggbb(_d_o_u_b_l_e _x)

     _d_o_u_b_l_e
     nneexxttaafftteerr(_d_o_u_b_l_e _x, _d_o_u_b_l_e _y)

     _d_o_u_b_l_e
     rreemmaaiinnddeerr(_d_o_u_b_l_e _x, _d_o_u_b_l_e _y)

     _d_o_u_b_l_e
     ssccaallbbnn(_d_o_u_b_l_e _x, _i_n_t _n)

DDEESSCCRRIIPPTTIIOONN
     These functions are required or recommended by IEEE Std754-1985.

     ccooppyyssiiggnn() returns _x with its sign changed to _y's.

     ffiinniittee() returns the value 1 just when -infinity < _x < +infinity; other-
     wise a zero is returned (when |_x| = infinity or _x is _N_a_N

     iillooggbb() returns _x's exponent _n, in integer format.  iillooggbb(_+_-_i_n_f_i_n_i_t_y) re-
     turns INT_MAX and iillooggbb(_0) returns INT_MIN.

     nneexxttaafftteerr() returns the next machine representable number from _x in di-
     rection _y.

     rreemmaaiinnddeerr() returns the remainder _r := _x - _n_*_y where _n is the integer
     nearest the exact value of _x/_y; moreover if |_n - _x/_y| = 1/2 then _n is
     even.  Consequently the remainder is computed exactly and |_r| <= |_y|/2.
     But rreemmaaiinnddeerr(_x, _0) and rreemmaaiinnddeerr(_i_n_f_i_n_i_t_y, _0) are invalid operations
     that produce a _N_a_N.

     ssccaallbbnn() returns _x*(2**_n) computed by exponent manipulation.

SSEEEE AALLSSOO
     math(3)

HHIISSTTOORRYY
     The iieeeeee functions appeared in 4.3BSD.

SSTTAANNDDAARRDDSS
     IEEE Std754-1985

BSD Experimental               October 18, 1994                              1
