void main()
{
- static assert(approxEqual(sin(2.0L), 0.9092974L));
- static assert(approxEqual(cos(2.0), -0.4161468));
- static assert(approxEqual(tan(2.0f), -2.185040f));
- static assert(approxEqual(sqrt(2.0L), 1.414214L));
+ static assert(isClose(sin(2.0L), 0.9092974268));
+ static assert(isClose(cos(2.0), -0.4161468365));
+ static assert(isClose(tan(2.0f), -2.185040f, 1e-5));
+ static assert(isClose(sqrt(2.0L), 1.4142135623));
static assert(fabs(-2.0) == 2.0);
static assert(ldexp(2.5f, 3) == 20.0f);