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][BZ #6792] Set errno for log1p on pole/domain error.


On Tue, 31 Mar 2015, Stefan Liebler wrote:

> 2015-03-31  Stefan Liebler  <stli@linux.vnet.ibm.com>
> 
> 	[BZ #6792]
> 	math/w_log1p.c: New File.
> 	Add wrapper which sets errno on pole or domain error.
> 	Add weak_alias for corresponding log1p function.

All these ChangeLog entries are missing the initial '* ' before the file 
name.  "New file" not "New File".  No further description of the file is 
needed in the ChangeLog entry.

> 	math/s_log1pl.c:
> 	Remove weak_alias for corresponding log1p function.

	(log1pl): Remove weak_alias.

> +    TEST_f_f (log1p, -2, qnan_value, INVALID_EXCEPTION|EDOM),

ERRNO_EDOM, not just EDOM.

> +/* Wrapper for __log1p handles setting errno.

"that handles".

> +double
> +__w_log1p (double x)
> +{
> +  if (__glibc_unlikely (x <= -1.0))

I'd expect you to need islessequal here to avoid spurious "invalid" 
exceptions for quiet NaN arguments.  (Some architectures may have GCC bugs 
meaning the wrong comparison gets used for <= and so this doesn't show up 
in glibc testing, e.g. bug 58684 for powerpc, but using <= would result in 
failures for architectures without such bugs or where those GCC bugs don't 
apply when compiling this implementation.)

The same comments apply to the implementations for other types.

> +/* Nothing to do.
> +   Errno is set in sysdeps/ia64/fpu/s_log1pf.S.  */

See the GNU Coding Standards: "If a lower-case identifier comes at the 
beginning of a sentence, don't capitalize it!  Changing the spelling makes 
it a different identifier.".

-- 
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]