swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

float->bits


From: Jonathan Impett
Subject: float->bits
Date: Wed, 06 Dec 2000 16:56:16 +0000

Hello - 
        Can anyone help perform what I'm sure is a simple operation? In
attempting to breed small networks within swarms, I need to read the
single-precision floating point weights of the nets as vectors of bits
for the GA, and vice-versa. 
        Essentially, I need a float and an array of 32 chars which can exchange
binary sequences. If I can get the binary contents of a float to be read
as an int, bitwise operators work and I'm home and dry. All successions
of assignment, recasting and pointing (too shameful and unsystematic to
reproduce here) have thus far failed. Anyone know the trick?

        Thanks,
        Jonathan


-- 

Jonathan Impett
Faculty of Music
University of Cambridge
West Road
Cambridge CB3 9DP
UK

tel: (+44) (0)1954 250192
address@hidden

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]