mirror of
https://github.com/freebsd/freebsd-src
synced 2024-10-07 00:50:50 +00:00
e38f230827
Undo the 80-bit "stub" implementation of the 128-bit long double tgammal(3) function. The latest (as of Feb 2024) version of the src/contrib/arm-optimised-routines library includes a standalone, full 128-bit replacement. This needs a small bit of wrapping to fit it in, but is otherwise a drop-in replacement. Testing this is hard, as most maths packages blow up as soon as their 80-bit floating-point capability is exceeded. With 128-bit tgammal(), this is easy to do, and this is the range that needs to be checked the most carefully. Using my copy of Maple, I was able to check that the output was within a few ULP of the correct answer, right up to the point of 128-bit over- and underflow. Additionally, the results are no worse, and indeed better than the 80-bit version. Steve Kargl sent me his libm testing code, which I used to verify that the excpetions for certain key values were correct. Tested in this case were +-Inf, +-NaN, +-1 and +-0. Differential Revision: https://reviews.freebsd.org/D44168 Reviewed by: theraven, andrew, imp
13 lines
273 B
C
13 lines
273 B
C
/*-
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*
|
|
* Copyright (c) 2024 The FreeBSD Foundation
|
|
*/
|
|
|
|
/*
|
|
* This is a pure C function generously donated by ARM.
|
|
* See src/contrib/arm-optimized-routines/math/tgamma128.[ch].
|
|
*/
|
|
#define tgamma128 tgammal
|
|
#include "tgamma128.c"
|