/*Translated by FOR_C, v3.4.2 (-), on 07/09/115 at 08:30:08 */ /*FOR_C Options SET: ftn=u io=c no=p op=aimnv s=dbov str=l x=f - prototypes */ #include #include "fcrt.h" #include "scoshm.h" #include /* PARAMETER translations */ #define CP1 .778752378267155e-01 #define CP2 .232293648552398e-02 #define CP3 .344417983443219e-04 #define CP4 .280407224259429e-06 #define CP5 .116744361560051e-08 #define CQ1 (-.545809550662099e-02*2.0e0) /* end of PARAMETER translations */ float /*FUNCTION*/ scoshm( float x) { float scoshm_v, xs; /* Copyright (c) 1996 California Institute of Technology, Pasadena, CA. * ALL RIGHTS RESERVED. * Based on Government Sponsored Research NAS7-03001. *>> 1994-10-20 SCOSHM Krogh Changes to use M77CON *>> 1993-05-07 SCOSHM WVSnyder JPL Initial code * * Compute cosh(x) - 1 using a rational approximation when abs(x) * is less than 1.2, else use the Fortran intrinsic function. * *--S replaces "?": ?COSHM */ xs = x*x; if (xs < 1.44e0) { scoshm_v = ((((((CP5*xs + CP4)*xs + CP3)*xs + CP2)*xs + CP1)* xs + 1.0e0)*xs)/(CQ1*xs + 2.0e0); } else { scoshm_v = coshf( x ) - 1.0e0; } return( scoshm_v ); } /* end of function */