invalid floating point value

D

Dik T. Winter

>
> My usage was consistent to the OP's:
>
> A C double can be aliased by an array of unsigned char, to which
> any desired byte pattern may be written. Is there any somewhat
> portable way of assigning a byte pattern such that the result
> will, with very high probability, _not_ count as a valid double?
>
> And, unless I'm missing something, you've been unable to produce such a
> bit pattern, so your contributions to this thread have consisted of pure
> noise...

The OP continues with:
I ask because I'm in search of a mechanism for flagging "missing
values" in an array of doubles. I'm aware that the "best" (fully
portable) way probably involves setting up an ancillary array, or
making the basic data-type not a straight double but a struct of
some sort. But in context this would be a royal pain. One
common solution is to flag "missing" with a specific value such
as -999.0. I'm wondering if that can be improved upon without
resorting to a wider data type.
a bit pattern not generated by the floating point processor serves his
purpose very well.
 
D

Dan Pop

In said:
The OP continues with:
I ask because I'm in search of a mechanism for flagging "missing
values" in an array of doubles. I'm aware that the "best" (fully
portable) way probably involves setting up an ancillary array, or
making the basic data-type not a straight double but a struct of
some sort. But in context this would be a royal pain. One
common solution is to flag "missing" with a specific value such
as -999.0. I'm wondering if that can be improved upon without
resorting to a wider data type.
a bit pattern not generated by the floating point processor serves his
purpose very well.

But you still have been unable to produce one, so you're merely generating
more noise.

Dan
 
D

Dik T. Winter

>
> But you still have been unable to produce one, so you're merely generating
> more noise.

Darn. I have written that I know such patterns exist for the PDP 11, Vax,
Gould, Cray 1, CDC Cyber, and I know of only two processors for which they
definitely do not exist. So I have no idea what you are intending to say
here.
 
S

Suzie

So I have no idea what you are intending to say here.

He's just being an asshole know-it-all, as usual.
 
D

Dan Pop

In said:
Darn. I have written that I know such patterns exist for the PDP 11, Vax,
Gould, Cray 1, CDC Cyber, and I know of only two processors for which they
definitely do not exist. So I have no idea what you are intending to say
here.

One such bit pattern that works *portably*. Which is what the OS was
asking about.

Dan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,767
Messages
2,569,572
Members
45,045
Latest member
DRCM

Latest Threads

Top