This is the mail archive of the libc-alpha@sources.redhat.com 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]

math.h typo


I believe this constant in math.h is spelled wrong, with the result that
the compiled value is off by a bit in 128-bit quad precision.
 I get
   1.0/ln(2) = 1.44269504088896340735992468100189213742664595

	 * math/math.h (M_LOG2El): Correct the value.

*** math.h	2002/08/28 00:02:21	1.1
--- math.h	2002/10/25 13:26:01
*************** extern int matherr (struct exception *__
*** 335,341 ****
     GNU extension.  Provide enough digits for the 128-bit IEEE quad.  */
  #ifdef __USE_GNU
  # define M_El		2.7182818284590452353602874713526625L  /* e */
! # define M_LOG2El	1.4426950408889634073599246810018922L  /* log_2 e */
  # define M_LOG10El	0.4342944819032518276511289189166051L  /* log_10 e */
  # define M_LN2l		0.6931471805599453094172321214581766L  /* log_e 2 */
  # define M_LN10l	2.3025850929940456840179914546843642L  /* log_e 10 */
--- 335,341 ----
     GNU extension.  Provide enough digits for the 128-bit IEEE quad.  */
  #ifdef __USE_GNU
  # define M_El		2.7182818284590452353602874713526625L  /* e */
! # define M_LOG2El	1.4426950408889634073599246810018921L  /* log_2 e */
  # define M_LOG10El	0.4342944819032518276511289189166051L  /* log_10 e */
  # define M_LN2l		0.6931471805599453094172321214581766L  /* log_e 2 */
  # define M_LN10l	2.3025850929940456840179914546843642L  /* log_e 10 */


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