Re: bitwise on float



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
.



Relevant Pages

  • Re: Is electromagnetic field theory unified?
    ... >> I've tried to explain that kinetic energy is nothing but a potential. ... > antenna, not magnet, since the reaction torque acting on an antenna has ... > been experimentally measured) is such that, if a freely spinning magnet ... > Scattering by a rotating non-conductive particle is essentially radiation ...
    (sci.physics)
  • Re: Damn you, FEDEX! or Nikon D40 lost in Springfield, MO blackhole.
    ... the 2 mp Mavica he had been using with a Nikon D40. ... After shopping around, he got me to order one for him. ... The shipper had it insured, but from what I have read it could take weeks to sort this crap out. ... You may get your insurance from FedEx and a couple weeks later they find it and deliver it. ...
    (alt.photography)
  • Re: Why not unions
    ... > The problem is with all the alignment and data type differences among ... > compilers, this is effectively useless these days. ... Given that variants are still used extensively I don't think you can dismiss ... > I think you are mistaken about unions being more memory efficient than ...
    (comp.programming)
  • Re: (long) An AES implementation for 32-bit platforms
    ... > allows you to then declare things as: ... > (similarly for unions and enums). ... both versions of the compilers without problems. ...
    (sci.crypt)
  • Re: python 3 constant
    ... is require Python to change to accommodate your need. ... Can you see the slight difference? ... Best regards, ...
    (comp.lang.python)