Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!wuarchive!zaphod.mps.ohio-state.edu!unix.cis.pitt.edu!dsinc!ub!csn!boulder!spot.Colorado.EDU!hartkopf From: hartkopf@spot.Colorado.EDU (Jeff Hartkopf) Newsgroups: comp.sys.apple2 Subject: Problems with sinh function in ORCA/C Keywords: math, ORCA/C, programming Message-ID: <1991May21.032549.25803@colorado.edu> Date: 21 May 91 03:25:49 GMT Sender: news@colorado.edu (The Daily Planet) Organization: University of Colorado, Boulder Lines: 37 Nntp-Posting-Host: spot.colorado.edu Does anyone know of any problems either with the ORCA/C 1.2 hyperbolic sine (sinh) function itself, or with the SANE call(s) it makes? I ask because I'm having a wierd problem with it. If I boot the IIGS and run ORCA/C, and then run the following program, everything works fine: #include #include extended mine(extended x) /* my sinh function for testing purposes */ { return ((exp(x) - exp(-x))/2); /* this is the formula for sinh(x) */ } void main(void) { printf("sinh(%f) = %f\n", 4.0, sinh(4.0)); printf("mine(%f) = %f\n", 4.0, mine(4.0)); } In other words, both printf statements print out the same thing (~27.289...), as they should. However, after I run some other programs, do some calculations, etc., and then run the above program again, the ORCA/C sinh function doesn't return the right value, although my sinh function *does* return the right value. And the result of ORCA/C's sinh is off by approximately a factor of 2, something like 54.xxx. Anyone have any ideas? Jeff Hartkopf University of Colorado at Boulder Internet: hartkopf@spot.colorado.edu