modfl(3): Fix conversion from FreeBSD.
LDBL_MANL_SIZE is spelled EXT_FRACLBITS -- and not EXT_FRACHBITS. PR lib/58237: modfl returns wrong answers on ld128 architectures
This commit is contained in:
parent
e4ebea9efd
commit
906e271cb3
|
@ -36,7 +36,7 @@
|
|||
* $FreeBSD: head/lib/msun/src/s_modfl.c 165855 2007-01-07 07:54:21Z das $
|
||||
*/
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: s_modfl.c,v 1.1 2014/06/16 12:54:43 joerg Exp $");
|
||||
__RCSID("$NetBSD: s_modfl.c,v 1.2 2024/05/15 00:02:56 riastradh Exp $");
|
||||
|
||||
#include "namespace.h"
|
||||
|
||||
|
@ -51,7 +51,7 @@ __RCSID("$NetBSD: s_modfl.c,v 1.1 2014/06/16 12:54:43 joerg Exp $");
|
|||
__weak_alias(modfl, _modfl)
|
||||
#endif
|
||||
|
||||
#if LDBL_MANL_SIZE > 32
|
||||
#if EXT_FRACLBITS > 32
|
||||
#define MASK ((uint64_t)-1)
|
||||
#else
|
||||
#define MASK ((uint32_t)-1)
|
||||
|
@ -59,7 +59,7 @@ __weak_alias(modfl, _modfl)
|
|||
/* Return the last n bits of a word, representing the fractional part. */
|
||||
#define GETFRAC(bits, n) ((bits) & ~(MASK << (n)))
|
||||
/* The number of fraction bits in manh, not counting the integer bit */
|
||||
#define HIBITS (LDBL_MANT_DIG - EXT_FRACHBITS)
|
||||
#define HIBITS (LDBL_MANT_DIG - EXT_FRACLBITS)
|
||||
|
||||
static const long double zero[] = { 0.0L, -0.0L };
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: t_fe_round.c,v 1.19 2024/05/09 12:18:28 riastradh Exp $ */
|
||||
/* $NetBSD: t_fe_round.c,v 1.20 2024/05/15 00:02:57 riastradh Exp $ */
|
||||
|
||||
/*
|
||||
* Written by Maya Rashish <maya@NetBSD.org>
|
||||
|
@ -8,7 +8,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_fe_round.c,v 1.19 2024/05/09 12:18:28 riastradh Exp $");
|
||||
__RCSID("$NetBSD: t_fe_round.c,v 1.20 2024/05/15 00:02:57 riastradh Exp $");
|
||||
|
||||
#include <atf-c.h>
|
||||
#include <fenv.h>
|
||||
|
@ -400,12 +400,6 @@ ATF_TC_BODY(fe_nearbyintl_rintl, tc)
|
|||
fnname[fn], valuesl[i].input);
|
||||
}
|
||||
|
||||
#if __HAVE_LONG_DOUBLE + 0 == 128
|
||||
atf_tc_expect_fail("PR lib/58237:"
|
||||
" modfl returns wrong answers"
|
||||
" on ld128 architectures");
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Verify the fractional part of the result is
|
||||
* zero -- the result of rounding to an integer
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: t_modf.c,v 1.5 2024/05/08 22:57:37 riastradh Exp $ */
|
||||
/* $NetBSD: t_modf.c,v 1.6 2024/05/15 00:02:57 riastradh Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2014 The NetBSD Foundation, Inc.
|
||||
|
@ -30,7 +30,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__RCSID("$NetBSD: t_modf.c,v 1.5 2024/05/08 22:57:37 riastradh Exp $");
|
||||
__RCSID("$NetBSD: t_modf.c,v 1.6 2024/05/15 00:02:57 riastradh Exp $");
|
||||
|
||||
#include <atf-c.h>
|
||||
#include <float.h>
|
||||
|
@ -289,11 +289,6 @@ ATF_TC_BODY(modfl, tc)
|
|||
{
|
||||
unsigned n;
|
||||
|
||||
#if __HAVE_LONG_DOUBLE + 0 == 128
|
||||
atf_tc_expect_fail("PR lib/58237:"
|
||||
" modfl returns wrong answers on ld128 architectures");
|
||||
#endif
|
||||
|
||||
for (n = 0; n < __arraycount(casesf); n++) {
|
||||
long double x, i, f;
|
||||
|
||||
|
|
Loading…
Reference in New Issue