This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c
- From: "Paul E. Murphy" <murphyp at linux dot vnet dot ibm dot com>
- To: Joseph Myers <joseph at codesourcery dot com>
- Cc: libc-alpha at sourceware dot org
- Date: Fri, 27 May 2016 13:06:26 -0500
- Subject: Re: [PATCHv3 08/11] Apply LIT(x) to floating point literals in libm-test.c
- Authentication-results: sourceware.org; auth=none
- References: <cover dot 1464297421 dot git dot murphyp at linux dot vnet dot ibm dot com> <ff665f581def497f80a486fa5d5e636140a40e24 dot 1464297421 dot git dot murphyp at linux dot vnet dot ibm dot com> <alpine dot DEB dot 2 dot 20 dot 1605271722100 dot 16665 at digraph dot polyomino dot org dot uk>
On 05/27/2016 12:24 PM, Joseph Myers wrote:
> On Thu, 26 May 2016, Paul E. Murphy wrote:
>
>> +# Apply a prefix and suffix to a floating point value after
>> +# stripping the suffix, or return the unaltered string.
>> +sub wrap_lit {
>> + my ($lit,$prefix,$suffix) = @_;
>
> Use spaces after commas.
>
>> + # base 10 integer raised to a power,
>
> I think you mean base 10 integer with an exponent / times 10 to a
> power....
>
>> + } elsif ($descr[$i] eq "j") {
>> + $cline .= ", " . &apply_suf ($args[$current_arg], "L");
>
> I don't see a use in replacing suffixes for the long double argument to
> nexttoward. I'd just expect the source file to have the right suffix if
> needed and leave it unchanged, as for integer arguments. (This then means
> apply_suf is unneeded.)
Ok, so the new option can be generalized to one which does not attempt to
fixup an FP literal.
Likewise, I assume wrap_lit should be squashed with apply_lit.
>
>> + } elsif ($_ eq "j") {
>> + $result = apply_suf ($result, "L");
>
> Likewise.
>