From 465dd29a7b2d44cbcac9ae24b709d87ca7fbf61d Mon Sep 17 00:00:00 2001 From: otto Date: Fri, 22 Apr 2022 17:37:47 +0000 Subject: [PATCH] arm64 has real IEEE quads, it needs more digits when reading the 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 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/regress/usr.bin/bc/t19.c b/regress/usr.bin/bc/t19.c index 0211c6c384a..37373fb772e 100644 --- a/regress/usr.bin/bc/t19.c +++ b/regress/usr.bin/bc/t19.c @@ -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 @@ -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); -- 2.20.1