[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
FW: [avr-gcc-list] Double?
From: |
Daniel Williamson |
Subject: |
FW: [avr-gcc-list] Double? |
Date: |
Wed, 18 Dec 2002 09:42:17 -0000 |
Erm, Sorry out there.
I went home last night and forgot about the problem,
Then in my usual way I had a flash of inspiration ( I claim to have lots of
these but then forget to write them down, so leaving no trace that they ever
occurred!)
I realised the problem was because I had:-
long = int * unsigned char;
So the maths was being done as a signed int,
In my bid to fix the problem I'd changed the size of the storage variable to
long but by then it was too late.
I cast the signed int as a long:-
long = (long)int * unsigned char;
and it worked.
In fact it's taken longer to write this e-mail than to fix the problem!
I'd rather it was something much more complicated, I wouldn't feel so daft!
Thanks for your help.
Dan.
avr-gcc-list at http://avr1.org