decimal_to_floating(3c) 맨 페이지 - 윈디하나의 솔라나라

개요

섹션
맨 페이지 이름
검색(S)

decimal_to_floating(3c)

Standard C Library Functions                           decimal_to_floating(3C)



NAME
       decimal_to_floating,    decimal_to_single,   decimal_to_double,   deci‐
       mal_to_extended,  decimal_to_quadruple  -  convert  decimal  record  to
       floating-point value

SYNOPSIS
       #include <floatingpoint.h>

       void decimal_to_single(single *px, decimal_mode *pm,
            decimal_record *pd, fp_exception_field_type *ps);


       void decimal_to_double(double *px, decimal_mode *pm,
            decimal_record *pd, fp_exception_field_type *ps);


       void decimal_to_extended(extended *px, decimal_mode *pm,
            decimal_record *pd, fp_exception_field_type *ps);


       void decimal_to_quadruple(quadruple *px, decimal_mode *pm,
            decimal_record *pd, fp_exception_field_type *ps);

DESCRIPTION
       These  functions  convert  the  decimal  record *pd to a floating-point
       value *px observing the rounding direction specified in *pm and setting
       *ps to reflect any floating-point exceptions that occur.


       When  pd->fpclass  is  fp_zero, fp_infinity, fp_quiet, or fp_signaling,
       *px is set to zero, infinity, a quiet NaN, or a signaling NaN,  respec‐
       tively,  with  the  sign indicated by pd->sign. All other fields in *pd
       are ignored.


       When pd->fpclass is fp_normal or fp_subnormal, pd->ds  must  contain  a
       null-terminated  string of one or more ASCII digits representing a non-
       zero integer m, and pd->ndigits must be equal to  the  length  of  this
       string. Then *px is set to a correctly rounded approximation to

         −1**(pd->sign) * m * 10**(pd->exponent)



       pd->more  can be set to a non-zero value to indicate that insignificant
       trailing digits were omitted from pd->ds. In this case, m  is  replaced
       by m + delta in the expression above, where delta is some tiny positive
       fraction.


       The converted value is rounded  according  to  the  rounding  direction
       specified in pm->rd. pm->df and pm->ndigits are not used.


       On exit, *ps contains a bitwise OR of flags corresponding to any float‐
       ing-point exceptions that occurred. The only  possible  exceptions  are
       underflow,  overflow,  and  inexact.  If  no  floating-point exceptions
       occurred, *ps is set to zero.

ATTRIBUTES
       See attributes(7) for descriptions of the following attributes:


       tab() box; cw(2.75i) |cw(2.75i) lw(2.75i) |lw(2.75i) ATTRIBUTE  TYPEAT‐
       TRIBUTE VALUE _ MT-LevelMT-Safe


SEE ALSO
       scanf(3C), string_to_decimal(3C), strtod(3C), attributes(7)



Oracle Solaris 11.4               1 Oct 2001           decimal_to_floating(3C)
맨 페이지 내용의 저작권은 맨 페이지 작성자에게 있습니다.
RSS ATOM XHTML 5 CSS3