This is the mail archive of the newlib@sourceware.org mailing list for the newlib 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] Remove log2 define


On Aug 24 14:37, Wilco Dijkstra wrote:
> Since newlib now has a fast implementation of log2,

Only if !__OBSOLETE_MATH

> remove a define which
> avoids calling log2.  The define makes math code slower and less accurate,
> so removing it is best.
> 
> Build OK on AArch64, OK for commit?
> 
> --
> diff --git a/newlib/libc/include/math.h b/newlib/libc/include/math.h
> index 893a5d0645148af0dd0a48f7e73504e07363a840..2d17dd13e52ae1893beba8c9a2565d7682dbbf89 100644
> --- a/newlib/libc/include/math.h
> +++ b/newlib/libc/include/math.h
> @@ -329,9 +329,6 @@ extern double lgamma (double);
>  extern double erf (double);
>  extern double erfc (double);
>  extern double log2 (double);
> -#if !defined(__cplusplus)
> -#define log2(x) (log (x) / _M_LN2)
> -#endif
>  
>  #ifndef __math_68881
>  extern double hypot (double, double);

Corinna

-- 
Corinna Vinschen
Cygwin Maintainer
Red Hat

Attachment: signature.asc
Description: PGP signature


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