*BSD News Article 9536


Return to BSD News archive

Received: by minnie.vk1xwt.ampr.org with NNTP
	id AA5938 ; Sat, 02 Jan 93 01:02:56 EST
Path: sserve!manuel.anu.edu.au!munnari.oz.au!spool.mu.edu!yale.edu!ira.uka.de!Germany.EU.net!hcshh!hm
From: hm@hcshh.hcs.de (Hellmuth Michaelis)
Newsgroups: comp.unix.bsd
Subject: Re: [386BSD] fp exception after 387 installation - help !
Keywords: 386BSD floating point 387
Message-ID: <1612@hcshh.hcs.de>
Date: 4 Jan 93 19:19:57 GMT
References: <1610@hcshh.hcs.de> <1611@hcshh.hcs.de>
Organization: HCS GmbH, Hamburg, Europe
Lines: 21

In <1611@hcshh.hcs.de> hm@hcshh.hcs.de (Hellmuth Michaelis) writes:

>[about installing an 387 and getting floating point exceptions after that]

>But the problem stays ! There is (and was) a "double" declaration of getpcpu()
>in ps.c - it solved the problem of the ps-coredump on the virgin 0.1, ps ran
>fine after installing the patchkit until i installed the 387 ....

got the gdb up and had a look, the exception is caused by the final
devide in the last line of getpcpu(), which reads

return(100.0 * fxtofl(p->p_pctcpu) / (1.0 - exp(p->p_time * log(fxtofl(ccpu)))));
                                  ^^^
                                  this causes the floating point exception.
is it somehow possible to get more information out of the fpu what exactly
caused the exception ?

hellmuth
-- 
hellmuth michaelis    HCS Hanseatischer Computerservice GmbH   hamburg, europe
hm@hcshh.hcs.de              tel: +49/40/55903-170         fax: +49/40/5591486