[net.micro.att] matherr

alex@rruxc.UUCP (A DeSimone) (08/27/85)

<< chomp, chomp, chomp >>

I've encountered a problem using the matherr(3M) facility on my unixpc.
My program is dealing with trig functions and I've included my own matherr()
routine to catch and deal with TLOSS, PLOSS, OVERFLOW, ... situations.
Everything works fine except for the sin() function.  When a sin() TLOSS/PLOSS
situation occurs, my matherr() is invoked but as soon as I try to access the
"exception" structure passed to matherr(), a "bus error" occurs.  tan() TLOSS/
PLOSS is handled just fine (by the same code, of course).  I moved my program
to a VAX and it works fine there.

I don't think the unixpc's sin() function is populating the "exception"
structure before passing control to matherr(), so the first attempt to access
results in the bus error.  Has anyone else encountered similar problems?
Can anyone "verify" that this is/is not a unixpc bug?  I'm running version 2.0
of the unixpc's UN*X.

->"So it goes."
->Alex DeSimone, Amala Consultants Inc. @ Bell Communications Research
->..!ihnp4!rruxc!alex

gwyn@brl-tgr.ARPA (Doug Gwyn <gwyn>) (08/29/85)

Sounds like the UNIX PC is not fully Release 2.0 of UNIX System V.
SVR1 had several errors in the math library, with confusion between
passing matherr() the exception structure or just a pointer to it.
You need source code to fix this.