File:  [MW Coherent from dump] / coherent / b / lib / libm / i387 / acos87.s
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Wed May 29 04:56:35 2019 UTC (7 years ago) by root
Branches: MarkWilliams, MAIN
CVS tags: relic, HEAD
coherent

//////////
/ /usr/src/libm/i387/acos87.s
/ i387 mathematics library
/ acos(d)
//////////

RASIZE	=	4

	.globl	acos
	.globl	_asin

//////////
/ double
/ acos(d)
/ double d;
//////////

d	=	RASIZE		/ arg offset

acos:
	fldl	d(%esp)		/ Load argument d.

	call	_asin		/ asin(d)
	jc	?0		/ d < -1 or 1 < d, domain error.
	fld1			/ 1, asin(d)
	fchs			/ -1, asin(d)
	fldpi			/ pi, -1, asin(d)
	fscale			/ pi/2, -1, asin(d)
	fstp	%st(1)		/ pi/2, asin(d)
	fsub			/ acos(d) = pi/2 - asin(d)

?0:
	ret

/ end of acos87.s

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.