[PATCHv3 03/11] Refactor M_ macros defined in libm-test.inc

Paul E. Murphy murphyp@linux.vnet.ibm.com
Fri May 27 16:08:00 GMT 2016


On 05/26/2016 06:14 PM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
> 
>> +/* (pi * 3 * ln(10) / 4 */
>> +#define lit_pi_3_m_ln10_m_4_d	LIT (1.023282265381381010614337719073516828)
> 
> You're missing a ')' in the comment.  And, the comment, and thus the macro 
> name according to your scheme, are inaccurate; this one involves dividing 
> by ln(10), not multiplying by it (all the ln(10) ones are for clog10 
> expectations).
> 

Very wrong indeed.  Let me fix it with:

+/* pi * 3 / (4 * ln(10)) */
+#define lit_pi_3_m_4_ln10_m_d  LIT (1.023282265381381010614337719073516828)

Likewise, the updated comment above all of them read poorly.

+/* Various constants derived from pi.  We must supply them precalculated for
+   accuracy.  They are written as a series of postfix operations to keep
+   them concise yet somewhat readable.  */

The updated patch is attached.  I'd prefer to get this approved and committed
before committing the other M_ -> lit_ changes.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-Refactor-M_-macros-defined-in-libm-test.inc.patch
Type: text/x-patch
Size: 8765 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20160527/274c0fba/attachment.bin>


More information about the Libc-alpha mailing list