Windows NT 4.0 source code leak
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

80 lines
1.5 KiB

;/***
;*itrigh.a - sinh, cosh, tanh functions
;*
;* Copyright (c) 1991-1991, Microsoft Corporation. All rights reserved.
;*
;*Purpose:
;* Hyperbolic trig functions to be used with M68K version
;*
;*Revision History:
;* 05-13-92 XY MAC version
;*
;*******************************************************************************/
#ifndef SANE
#include <traps.a>
externW _errno
;double sinh(double x)
cProc _CIsinh,PUBLIC
cBegin _CIsinh
fmove.l fpcr,d0
fmove.l #0,fpcr
fsinh.x fp0
fmove.l fpsr, d1 ;get status word
and.l #0x03007c00, d1 ;see if we get an exception
cmp.l #0, d1
bne range_error_fpu1
jra to_end_fpu1
range_error_fpu1:
move.l #34, _errno
to_end_fpu1:
fmove.l d0,fpcr
cEnd _CIsinh
;double cosh(double x)
cProc _CIcosh,PUBLIC
cBegin _CIcosh
fmove.l fpcr,d0
fmove.l #0,fpcr
fcosh.x fp0
fmove.l fpsr, d1 ;get status word
and.l #0x03007c00, d1 ;see if we get an exception
cmp.l #0, d1
bne range_error_fpu2
jra to_end_fpu2
range_error_fpu2:
move.l #34, _errno
to_end_fpu2:
fmove.l d0,fpcr
cEnd _CIcosh
;double tanh(double x)
cProc _CItanh,PUBLIC
cBegin _CItanh
fmove.l fpcr,d0
fmove.l #0,fpcr
ftanh.x fp0
fmove.l fpsr, d1 ;get status word
and.l #0x03007c00, d1 ;see if we get an exception
cmp.l #0, d1
bne range_error_fpu3
jra to_end_fpu3
range_error_fpu3:
move.l #34, _errno
to_end_fpu3:
fmove.l d0,fpcr
cEnd _CItanh
#endif