This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 3/8] float128: Add wrappers for IEEE functions.


On Wed, 9 Nov 2016, Gabriel F. T. Gomes wrote:

> From: "Paul E. Murphy" <murphyp@linux.vnet.ibm.com>
> 
> These are copied from the long double version. posix style
> errors are assumed, and inlined.  Where a function is not
> defined by TS 18661-3, the wrapper is not implemented.

I don't think float128-specific wrappers like this are appropriate.  All 
these wrappers should be type-generic.  If you put type-generic wrappers 
as math/w_*_template.c, will the existing wrappers with matherr support 
still take precedence for existing types?

> diff --git a/sysdeps/ieee754/float128/w_acosf128.c b/sysdeps/ieee754/float128/w_acosf128.c
> new file mode 100644
> index 0000000..cedbc98
> --- /dev/null
> +++ b/sysdeps/ieee754/float128/w_acosf128.c
> @@ -0,0 +1,35 @@
> +/* Copyright (C) 2016 Free Software Foundation, Inc.

Descriptive comment as first line of every new file.

> +/*
> + * wrapper atan2f128(y,x)
> + */

Comments need to follow the normal coding style.

> +/* wrapper y0f128 */
> +_Float128
> +__y0f128 (_Float128 x)
> +{
> +  if (__builtin_expect (islessequal (x, 0) || isgreater (x, X_TLOSS), 0))

No TLOSS checks.  That's only relevant for _LIB_VERSION != _POSIX_ in the 
original code.

> +/* wrapper sqrtf128 */
> +_Float128
> +__sqrtf128 (_Float128 x)
> +{
> +  if (__builtin_expect (isless (x, 0), 0) && _LIB_VERSION != _IEEE_)

No _LIB_VERSION checks in new wrappers.

-- 
Joseph S. Myers
joseph@codesourcery.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]