Path: utzoo!mnetor!uunet!seismo!sundc!pitstop!sun!decwrl!labrea!agate!pasteur!ames!nrl-cmf!cmcl2!brl-adm!umd5!umbc3!ken From: ken@umbc3.UMD.EDU (Ken Spagnolo ) Newsgroups: comp.sys.amiga Subject: Problems with trig functions and SDB Message-ID: <885@umbc3.UMD.EDU> Date: 18 Mar 88 20:55:55 GMT Distribution: na Organization: Univ of Maryland Baltimore County Lines: 25 (I'm waiting for .tech to become official too.) I hope these haven't been mentioned... Anyone know the story with the trig functions? (Jim?) sin and cos work just fine. cotan and atan2 come up as undefined, even though the manual says that all trig functions are in math.h. asin and acos don't work at all. If the radian value passed to them is within their range, you get back garbage. If it is not in their range, errno (from errno.h) should be set to EDOM or ERANGE, but it never changes from 0. Has any one come across this problem? The manual also states that the range for input to acos is 0 to pi. Shouldn't that be -1 to 1? As for SDB, I can't seem to print floats or doubles. Lets say you have a float f=1.1 and a double d=2.2. pf f prints out -3.1554709e-31 and pF d gives -5.149120961148757e-247. If you try it with a specified mantissa you get: 'double = X.000000000' where X is the length of the desired mantissa in either of the following - p X.f f or p X.F d. I also tried things like pX.F d (notice no space) but just got X double garbage numbers separated by commas. I give, what's the answer? Thanx all. Ken Spagnolo ken@umbc3.umd.edu uunet!umbc3!ken