orbel_schget.f 1.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. ***********************************************************************
  2. c ORBEL_SCHGET.F
  3. ***********************************************************************
  4. * PURPOSE: Given an angle, efficiently compute sinh and cosh.
  5. *
  6. * Input:
  7. * angle ==> angle in radians (real scalar)
  8. *
  9. * Output:
  10. * shx ==> sinh(angle) (real scalar)
  11. * chx ==> cosh(angle) (real scalar)
  12. *
  13. * ALGORITHM: Obvious from the code
  14. * REMARKS: Based on the routine SCGET for sine's and cosine's.
  15. * We use the sqrt rather than cosh (it's faster)
  16. * BE SURE THE ANGLE IS IN RADIANS AND IT CAN'T BE LARGER THAN 300
  17. * OR OVERFLOWS WILL OCCUR!
  18. * AUTHOR: M. Duncan.
  19. * DATE WRITTEN: May 6, 1992.
  20. * REVISIONS:
  21. ***********************************************************************
  22. subroutine orbel_schget(angle,shx,chx)
  23. include '../swift.inc'
  24. c... Inputs Only:
  25. real*8 angle
  26. c... Output:
  27. real*8 shx,chx
  28. c----
  29. c... Executable code
  30. shx = sinh(angle)
  31. chx= sqrt(1.d0 + shx*shx)
  32. return
  33. end ! orbel_schget
  34. c---------------------------------------------------------------------