On Wed, Aug 22, 2012 at 6:58 AM, Jeff B <a.GNUbie@xxxxxxxxxxxx> wrote: > > OK, then I guess the presence of the cast makes it OK for the compiler > to pull the bits for a variable from somewhere other than where the > variable actually is. No. As I said before, the problem is the calling convention. printf with %f expects a float argument. You are passing it an int argument. A float argument is passed in a float register. An int argument is passed in a general register. printf sees %f and looks in a float register. You are passing the value in an int register. Since you are not passing the value in a float register, printf is printing random bits that you never passed. Ian