	.386
	.model	use32 small

	extrn trigerr : proc,singerr : proc
	public	_tan
	.data
nm	db	"tan",0

	.code
_tan:
      	push	ebp
	mov	ebp,esp
	lea	ecx,[ebp+8]
	fld	qword ptr [ecx]
	fptan
	fcomp 	st(1)
	lea	eax,[nm]
	call	trigerr
	fld1
	fchs
	fldpi
	fscale
	fxch
	fcomp	st(1)
	fld	qword ptr [ecx]
	call	singerr
	leave
	ret
	end