Withdrawal? John Cowan (24 Oct 2020 20:54 UTC)
Re: Withdrawal? Arthur A. Gleckler (24 Oct 2020 20:58 UTC)
Re: Withdrawal? John Cowan (24 Oct 2020 21:04 UTC)
Re: Withdrawal? Arthur A. Gleckler (24 Oct 2020 21:10 UTC)
Re: Withdrawal? John Cowan (24 Oct 2020 22:20 UTC)
Re: Withdrawal? Emmanuel Medernach (25 Oct 2020 15:44 UTC)
Re: Withdrawal? Arthur A. Gleckler (25 Oct 2020 19:32 UTC)
Re: Withdrawal? Emmanuel Medernach (25 Oct 2020 20:41 UTC)
Re: Withdrawal? Marc Nieper-Wißkirchen (25 Oct 2020 20:54 UTC)
Re: Withdrawal? Emmanuel Medernach (26 Oct 2020 20:47 UTC)
Re: Withdrawal? Emmanuel Medernach (26 Oct 2020 21:08 UTC)
Re: Withdrawal? Marc Nieper-Wißkirchen (26 Oct 2020 21:33 UTC)
Re: Withdrawal? Emmanuel Medernach (27 Oct 2020 08:01 UTC)
Re: Withdrawal? Marc Nieper-Wißkirchen (27 Oct 2020 08:57 UTC)
Re: Withdrawal? Emmanuel Medernach (27 Oct 2020 20:44 UTC)
Re: Withdrawal? Wolfgang Corcoran-Mathe (25 Oct 2020 01:53 UTC)
Re: Withdrawal? Marc Nieper-Wißkirchen (25 Oct 2020 07:56 UTC)
Re: Withdrawal? John Cowan (25 Oct 2020 14:40 UTC)
Re: Withdrawal? Wolfgang Corcoran-Mathe (26 Oct 2020 18:07 UTC)
Re: Withdrawal? Marc Nieper-Wißkirchen (26 Oct 2020 18:12 UTC)
Re: Withdrawal? John Cowan (26 Oct 2020 22:19 UTC)
Re: Withdrawal? Wolfgang Corcoran-Mathe (27 Oct 2020 01:17 UTC)
Re: Withdrawal? John Cowan (27 Oct 2020 02:30 UTC)
Re: Withdrawal? Marc Nieper-Wißkirchen (27 Oct 2020 07:01 UTC)
Re: Withdrawal? Wolfgang Corcoran-Mathe (28 Oct 2020 16:53 UTC)
Re: Withdrawal? John Cowan (28 Oct 2020 18:35 UTC)
Re: Withdrawal? Wolfgang Corcoran-Mathe (28 Oct 2020 18:38 UTC)
Re: Withdrawal? Lucier, Bradley J (28 Oct 2020 18:37 UTC)
Re: Withdrawal? Marc Nieper-Wißkirchen (27 Oct 2020 06:58 UTC)
Re: Withdrawal? Wolfgang Corcoran-Mathe (27 Oct 2020 17:37 UTC)
Re: Withdrawal? Marc Nieper-Wißkirchen (27 Oct 2020 20:17 UTC)
Re: Withdrawal? Wolfgang Corcoran-Mathe (27 Oct 2020 22:30 UTC)
Re: Withdrawal? Arthur A. Gleckler (27 Oct 2020 23:49 UTC)
Re: Withdrawal? Marc Nieper-Wißkirchen (28 Oct 2020 06:17 UTC)
Re: Withdrawal? John Cowan (28 Oct 2020 15:09 UTC)
Re: Withdrawal? Marc Nieper-Wißkirchen (28 Oct 2020 17:04 UTC)

Re: Withdrawal? Wolfgang Corcoran-Mathe 27 Oct 2020 17:37 UTC

On 2020-10-27 07:58 +0100, Marc Nieper-Wißkirchen wrote:
> Am Di., 27. Okt. 2020 um 02:18 Uhr schrieb Wolfgang Corcoran-Mathe
> <xxxxxx@sigwinch.xyz>:
> >
> > On 2020-10-26 18:18 -0400, John Cowan wrote:
> > > On Mon, Oct 26, 2020 at 2:07 PM Wolfgang Corcoran-Mathe <xxxxxx@sigwinch.xyz>
> > > wrote:
> > >
> > > Would it be sufficient to provide C versions of
> > > > nan-quiet?, nan-negative?, etc., operating on doubles?
> > > >
> > >
> > > That's exactly what I had in mind.  Create a union type in C that can be
> > > either a double or a uint64, put in the double, get out the uint64, and
> > > bit-twiddle it, probably 10-15 lines of code.
> >
> > This would be undefined behavior in C89, but, after a lot of
>
> Is it undefined in C89? I think it is just implementation-defined behavior.

You're right, it's implementation-defined.

> > > If the member used to access the contents of a union object is not
> > > the same as the member last used to store a value in the object, the
> > > appropriate part of the object representation of the value is
> > > reinterpreted as an object representation in the new type as
> > > described in 6.2.6 (a process sometimes called "type punning").
> > > This might be a trap representation.
>
> "Reinterpreted as an object ..." is again implementation-defined,
> isn't it? Is there a way to find out how an IEEE double is mapped to
> an array of chars?

Yes, it seems so.  (With ISO C, there's always more.  I'm not really
sure now whether their adding that footnote in the 2007 draft
clarified anything.)

--
Wolfgang Corcoran-Mathe  <xxxxxx@sigwinch.xyz>

"To a wise man, the whole earth is open, because the true country of a
virtuous soul is the entire universe." --Democritus