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/6] Convert _Complex cosine functions to generated code


On Thu, 30 Jun 2016, Paul E. Murphy wrote:

> +      if (__real__ res == M_LIT (0.0))

As a general principle for all such changes:

Macroization makes the code less readable, so should be avoided where not 
necessary.  In particular, where implicit conversions from integers to 
floating point will suffice to give the right floating-point value with 
the right type, use integers, so use integer 0 here, and make similar 
changes throughout this patch series whenever the floating-point constant 
has a small value (not -0) representable in int.  (Of course, explicit 
-0.0 does need to use a floating-point constant, not an integer constant.)

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