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]

Re: fmax(+0,-0)


Ulrich Drepper <drepper@redhat.com> writes:

> Andreas Jaeger wrote:
>> What is the goal of our fmax implementation?  Should it return +0 for
>> fmax(+0,-0)?  I think the current C implementation :
>> [...]
>
> The standard doesn't require anything specific other than NaN handling.
>  Fortunately.  I'm inclined to leave it as is since no rules of math are
> violated.  If you insist on changing something talk to the ISO C (or
> even better: IEC 60559 people) to add something to their standard.

The standard says in a footnote to F9.9:
       314Ideally, fmax would be sensitive to the sign of zero, for
          example  fmax(-0.0,  +0.0)  would  return  +0;   however,
          implementation in software might be impractical.

So, we ignore that and decide to be impractical?  Fine with me, I just
want to be sure since I've seen an implementation that handles this
correctly.

Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


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