Re: bitwise on float
- From: roberson@xxxxxxxxxxxxxxxxxx (Walter Roberson)
- Date: Mon, 21 May 2007 15:29:21 +0000 (UTC)
In article <1179733076.397603.117040@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
James Dow Allen <jdallen2000@xxxxxxxxx> wrote:
On May 19, 10:40 pm, rober...@xxxxxxxxxxxxxxxxxx (Walter Roberson)
wrote:
In article <1179564726.399737.310...@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>,
James Dow Allen <jdallen2...@xxxxxxxxx> wrote:
order to work one need to perform crossover and bitflip operations on
encoded data [in floating point format].
It should be straightforward to achieve what you want
with unions.
No.
No, yourself!
I was going to explain unions to you, and why one can
often "achieve what you want" with code that isn't
strictly compliant and may only run as intended on
99% of compilers, but I see that this has been
explained, downthread, two days after my post and
with no "refutation" by you.
The other poster made it clear that non-portable behaviour was being
discussed. You, on the other hand, said "It should be straightforward".
You made no mention of restrictions on the solution. Using implementation
defined or undefined behaviour is not straightforward. It is also
completely unnecessary in this case, as casting the location
address to pointer to unsigned char has well-define semantics.
--
If you lie to the compiler, it will get its revenge. -- Henry Spencer
.
- References:
- bitwise on float
- From: Carramba
- Re: bitwise on float
- From: James Dow Allen
- Re: bitwise on float
- From: Walter Roberson
- Re: bitwise on float
- From: James Dow Allen
- bitwise on float
- Prev by Date: Re: gets() is dead
- Next by Date: Re: The result of ++ is not an lvalue?
- Previous by thread: Re: bitwise on float
- Next by thread: Re: bitwise on float
- Index(es):
Relevant Pages
|