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] BZ#13889: expl (709.75) wrongly overflows for ldbl-128ibm


On 03/21/2013 04:11 PM, Andreas Jaeger wrote:
> On 03/19/2013 07:44 PM, Adhemerval Zanella wrote:
>> +static const long double
>> +o_threshold = 709.78271289338399678773454114191496482L,
>> +u_threshold = -744.44007192138126231410729844608163411L;
>> +
>> +long double __expl(long double x)    /* wrapper exp */
>
> Could you fix the formatting issues, please? Add spaces before the opening braces in all cases.
Fixed.
>
>> +{
>> +#ifdef _IEEE_LIBM
>
> I know you copy & pasted this code but I think that we can remove this check for _IEEE_LIBM completely. Care for a followup patch to cleanup all usages?
Good idea, I'll check for these in ldbl128-ibm implementation.
>
>> +  return __ieee754_expl(x);
>> +#else
>> +  long double z;
>> +  z = __ieee754_expl(x);
>> +  if (_LIB_VERSION == _IEEE_)
>> +    return z;
>> +  if (__finitel(x))
>> +    {
>> +      if (x >= o_threshold)
>> +    return __kernel_standard_l(x,x,206); /* exp overflow */
>> +      else if (x <= u_threshold)
>> +    return __kernel_standard_l(x,x,207); /* exp underflow */
>> +    }
>> +  return z;
>> +#endif
>> +}
>> +hidden_def (__expl)
>>   long_double_symbol (libm, __expl, expl);
>> +
>
> git push will not allow an empty line at the end of the file, better fix it directly ;)
>
> Ok with the proposed changes,
>
Fixed and pushed as e42a38dd9dd4bbeb0fbd6e99f35d796ba37b6879. Thanks for the review.


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