#define DEG2RAD(x) ((x) * M_PI / 180.0)
#define DEG2RADF(x) ((x) * (float)M_PI / 180.f)
#define FAKETAN(x) (sin((x)) / cos((x)))
const double testd1 = tan(DEG2RAD(45.0));
const double testd2 = tan(DEG2RAD(90.0));
const double testd3 = tan(DEG2RAD(0.0));
const double testd4 = tan(DEG2RAD(22.5));
const float testf1 = tanf(DEG2RADF(45.0f));
const float testf2 = tanf(DEG2RADF(90.0f));
const float testf3 = tanf(DEG2RADF(0.0f));
const float testf4 = tanf(DEG2RADF(22.5f));
const double testc1 = FAKETAN(DEG2RAD(45.0));
const double testc2 = FAKETAN(DEG2RAD(90.0));
const double testc3 = FAKETAN(DEG2RAD(0.0));
const double testc4 = FAKETAN(DEG2RAD(22.5));
(gdb) p testd1
$2 = 0
(gdb) p testd2
$3 = 0
(gdb) p testd3
$4 = 0
(gdb) p testd4
$5 = 0
(gdb) p testf1
$6 = 0
(gdb) p testf2
$7 = 0
(gdb) p testf3
$8 = 0
(gdb) p testf4
$9 = 1.55740774
(gdb) p testc1
$10 = 0.99999999999999989
(gdb) p testc2
$11 = 16331778728383844
(gdb) p testc3
$12 = 0
(gdb) p testc4
$13 = 0.41421356237309509
testd1 = nan
testd2 = nan
testd3 = nan
testd4 = nan
testf1 = nan
testf2 = nan
testf3 = nan
testf4 = nan
testc1 = 1.000000
testc2 = 1.633178e+16
testc3 = 0.000000
testc4 = 0.414214