Converting between comp_t and float/double on SunOS

Converting between comp_t and float/double on SunOS

Post by Leonard J. Peir » Wed, 18 Mar 1992 07:38:08



In /usr/include/sys/acct.h comp_t is defined as u_short but the comment
is that comp_t is "a 3 bits base 8 exponent, 13 bit fraction ``floating
point'' number."

I'd like to convert this to a float or preferrably a double.  Is there
an existing system call or function on SunOS to do this that I'm not finding?

E-mail replies are best....
--


Academic Computing Services
Kalamazoo, MI  49008            Phone:     (616) 387-5469

Let us labor at thinking clearly; herein lies the source of m*conduct.
                                                - Pascal