grub2: bring back build of aros-side grub2 tools
[AROS.git] / workbench / libs / mathieeedoubtrans / ieeedptan.c
blobeffa2b65ee311273de2e94494effb29cfa35186b
1 /*
2 Copyright © 1995-2008, The AROS Development Team. All rights reserved.
3 $Id$
4 */
6 #include "mathieeedoubtrans_intern.h"
8 /*****************************************************************************
10 NAME */
12 AROS_LHQUAD1(double, IEEEDPTan,
14 /* SYNOPSIS */
15 AROS_LHAQUAD(double, y, D0, D1),
17 /* LOCATION */
18 struct MathIeeeDoubTransBase *, MathIeeeDoubTransBase, 8, MathIeeeDoubTrans)
20 /* FUNCTION
21 Calculate the tangens of the given IEEE double precision number
22 where y represents an angle in radians.
24 INPUTS
26 RESULT
27 result - IEEE double precision floating point number
29 BUGS
31 INTERNALS
33 *****************************************************************************/
35 AROS_LIBFUNC_INIT
36 QUAD sn, cs, Res;
38 cs = IEEEDPCos(y);
39 sn = IEEEDPSin(y);
40 if (is_eqC(cs, 0, 0))
42 Set_Value64C(Res, IEEEDPPInfty_Hi, IEEEDPPInfty_Lo);
43 return Res;
45 else
47 return IEEEDPDiv(sn, cs);
50 AROS_LIBFUNC_EXIT