From 6b950e436b9d81edb982d740d02198ba184402fb Mon Sep 17 00:00:00 2001 From: Michael Forney Date: Fri, 22 Feb 2019 14:26:39 -0800 Subject: [PATCH] sort: Use regular `double` for -n `long double` may require software emulation and the (possible) extra precision is unnecessary here. --- sort.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sort.c b/sort.c index 623b81e..9706e8f 100644 --- a/sort.c +++ b/sort.c @@ -177,7 +177,7 @@ static int slinecmp(struct line *a, struct line *b) { int res = 0; - long double x, y; + double x, y; struct keydef *kd; TAILQ_FOREACH(kd, &kdhead, entry) { @@ -190,8 +190,8 @@ slinecmp(struct line *a, struct line *b) TAILQ_LAST(&kdhead, kdhead) != TAILQ_FIRST(&kdhead)) { res = 0; } else if (kd->flags & MOD_N) { - x = strtold(col1.line.data, NULL); - y = strtold(col2.line.data, NULL); + x = strtod(col1.line.data, NULL); + y = strtod(col2.line.data, NULL); res = (x < y) ? -1 : (x > y); } else if (kd->flags & (MOD_D | MOD_F | MOD_I)) { res = skipmodcmp(&col1.line, &col2.line, kd->flags);