File:  [MW Coherent from dump] / coherent / b / lib / libm / i8087 / sqrt87.m
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

//////////
/ libm 8087
/ sqrt(d)
//////////

#include "larges.h"
#include "ifno8087.h"

	.globl  sqrt_
	.globl	tstcc
	.globl	edomain

//////////
/ double
/ sqrt(d)
/ double d;
//////////

d	=	RASIZE		/ arg offset

sqrt_:
	ifno8087(_sqrt_)
	mov	bx, sp
	fdld	Pss d(bx)	/ Load argument d.

	Gcall	tstcc		/ Test if d < 0.
	jae	0f		/ d >= 0.
	Gjmp	edomain		/ Issue EDOM error and return 0.

0:	fsqrt			/ result = sqrt(d)
	Gret

unix.superglobalmegacorp.com

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