1*20008Sdist# 2*20008Sdist# Copyright (c) 1980 Regents of the University of California. 3*20008Sdist# All rights reserved. The Berkeley software License Agreement 4*20008Sdist# specifies the terms and conditions for redistribution. 5*20008Sdist# 6*20008Sdist# @(#)asin.s 5.1 (Berkeley) 05/08/85 7*20008Sdist# 8*20008Sdist# 919993Sdist#double asin(arg) 1019993Sdist#double arg; -1.0<=arg<=1.0 or an out of range error return 1119993Sdist#method: call atan() after range reduction 1219993Sdist# calls: satan (internal entry point of atan.s), _sqrt 1319993Sdist# J F Jarvis August 8, 1078 1419993Sdist.globl _asin 1519993Sdist.globl _errno 1619993Sdist.globl _sqrt 1719993Sdist.globl satan 1819993Sdist.set EDOM,33 1919993Sdist.text 2019993Sdist.align 1 2119993Sdist_asin: 2219993Sdist .word 0x3c0 2319993Sdist bispsw $0xe0 2419993Sdist movd 4(ap),r6 2519993Sdist jgtr a1 2619993Sdist mnegd r6,r6 2719993Sdista1: cmpd r6,$0d1.0e+0 2819993Sdist jleq a2 2919993Sdist movl $EDOM,_errno 3019993Sdist clrd r0 3119993Sdist ret 3219993Sdist# 3319993Sdista2: muld3 r6,r6,r0 3419993Sdist subd3 r0,$0d1.0e+0,-(sp) 3519993Sdist calls $2,_sqrt 3619993Sdist cmpd r6,$0d0.6875 3719993Sdist jleq a3 3819993Sdist divd2 r6,r0 3919993Sdist jsb satan 4019993Sdist subd3 r0,pio2,r0 4119993Sdist jbr a4 4219993Sdista3: divd3 r0,r6,r0 4319993Sdist jsb satan 4419993Sdista4: tstd 4(ap) 4519993Sdist jleq a5 4619993Sdist ret 4719993Sdista5: mnegd r0,r0 4819993Sdist ret 4919993Sdist.data 5019993Sdist.align 2 5119993Sdistpio2: .double 0d1.57079632679489661923e+0 52