Groups | Search | Server Info | Login | Register


Groups > comp.arch.arithmetic > #92

Re: Quiet NaN question

From Terje Mathisen <terje.mathisen@tmsw.no>
Newsgroups comp.arch.arithmetic
Subject Re: Quiet NaN question
Date 2016-06-20 01:10 +0200
Organization Aioe.org NNTP Server
Message-ID <nk78ps$t2a$1@gioia.aioe.org> (permalink)
References <nk370k$l6a$1@news.albasani.net> <nk4gpd$13rq$1@gioia.aioe.org> <nk5vs6$sf2$1@news.albasani.net>

Show all headers | View raw


Bonita Montero wrote:
> Am 19.06.2016 um 00:08 schrieb Terje Mathisen:
>
>> In particular operations on NaN(s) intentionally breaks associativity,
>> look at comparisons.
>
> I found a funny thing: When operating on two NaNs with the x87-FPU,
> the lower 51 bits of the result is loaded with the larger value of
> the lower 51 bits of both operands.
>
Not funny:

This is a very natural result of having an internal pathway that sorts 
the inputs into larger/smaller (ignoring sign), which is something you 
need if you are going to subtract.

It doesn't matter for FMUL or FADD, except when an FADD has inputs with 
opposite signs and really was a FSUB.

For FDIV however you need to skip that compare/swap network, but FDIV is 
an order of magnitude slower anyway.

Terje

-- 
- <Terje.Mathisen at tmsw.no>
"almost all programming can be viewed as an exercise in caching"

Back to comp.arch.arithmetic | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

Quiet NaN question Bonita Montero <Bonita.Montero@gmail.com> - 2016-06-18 12:15 +0200
  Re: Quiet NaN question Bonita Montero <Bonita.Montero@gmail.com> - 2016-06-18 12:22 +0200
  Re: Quiet NaN question Terje Mathisen <terje.mathisen@tmsw.no> - 2016-06-19 01:08 +0300
    Re: Quiet NaN question Bonita Montero <Bonita.Montero@gmail.com> - 2016-06-19 13:32 +0200
      Re: Quiet NaN question Terje Mathisen <terje.mathisen@tmsw.no> - 2016-06-20 01:10 +0200
        Re: Quiet NaN question bde@etaplex.bde.org (Bruce Evans) - 2016-06-20 04:24 +0000

csiph-web