]> git.ipfire.org Git - thirdparty/gcc.git/blobdiff - gcc/testsuite/gdc.test/compilable/ctfe_math.d
d: Import dmd b8384668f, druntime e6caaab9, phobos 5ab9ad256 (v2.098.0-beta.1)
[thirdparty/gcc.git] / gcc / testsuite / gdc.test / compilable / ctfe_math.d
index 334b75ac941484b96f8f48db509b002b4c555624..65c99855b680b399eb8a1b80a976724fecffd8e2 100644 (file)
@@ -5,10 +5,10 @@ import std.math;
 
 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);