arm64 has real IEEE quads, it needs more digits when reading the
authorotto <otto@openbsd.org>
Fri, 22 Apr 2022 17:37:47 +0000 (17:37 +0000)
committerotto <otto@openbsd.org>
Fri, 22 Apr 2022 17:37:47 +0000 (17:37 +0000)
bc results otherwise truncation and loss of precision occurs, making the
test fail.

Test failure on arm64 noted by anton@ and bluhmn@

regress/usr.bin/bc/t19.c

index 0211c6c..37373fb 100644 (file)
@@ -1,4 +1,4 @@
-/*     $OpenBSD: t19.c,v 1.4 2017/11/29 14:31:50 otto Exp $    */
+/*     $OpenBSD: t19.c,v 1.5 2022/04/22 17:37:47 otto Exp $    */
 
 /*
  * Copyright (c) 2012 Otto Moerbeek <otto@drijf.net>
@@ -51,7 +51,7 @@ main(void)
                                if (v == 0.0 && funcs[fi].f == logl)
                                        continue;
                                snprintf(cmd, sizeof(cmd),
-                                   "bc -l -e scale=%d -e '%s(%.19Lf)' -equit",
+                                   "bc -l -e scale=%d -e '%s(%.36Lf)' -equit",
                                    scale[si], funcs[fi].name, v);
                                fp = popen(cmd, "r");
                                ret = fscanf(fp, "%Lf", &d1);