Path: utzoo!utgpu!news-server.csri.toronto.edu!rpi!zaphod.mps.ohio-state.edu!mips!cs.uoregon.edu!ns.uoregon.edu!milton!sumax!polari!rwing!eskimo!nanook From: nanook@eskimo.celestial.com (Robert Dinse) Newsgroups: comp.unix.programmer Subject: comp_t Keywords: Accounting, comp_t, funny floats... Message-ID: <512@eskimo.celestial.com> Date: 28 Apr 91 10:55:31 GMT Organization: ESKIMO NORTH (206) 367-3837 SEATTLE WA. Lines: 14 I am trying to write a program that looks at system accounting data and figures out what programs use how much CPU time. The file has a structure that has several items in a data type "comp_t", which is packed into an unsigned short (16 bits). The comments say: /* 13-bit fraction, 3-bit exponent */ This is on a Tandy 6000 running Xenix 3.02.01. Can anybody tell me how to turn this funny 16-bit float into an interger number? This is used for CPU time in clock ticks.