Re: [avr-gcc-list] double precision bit representation

2005-07-07 Thread Kitts
On Thursday 07 Jul 2005 5:00 am IST, Parthasaradhi Nayani wrote:
Hello Nayani,

When you say avr-gcc supports only float and not double do you mean that 
when a variable in declared as double, it is equivalent of declaring it as 
float?

Thanks for giving me the decimal equivalent of the byte pattern. I would 
like to know how you do it. I tried googling around to get info but failed. 
May be i was not searching right!

-- 
Cheers!
Kitts

PN Hello,
PN 
PN Currently avr-gcc supports only float and not double.
PN The byte pattern given in your query results in a
PN float value of -1.135254
PN 
PN Nayani P
PN 
PN 
PN --- Kitts [EMAIL PROTECTED] wrote:
PN 
PN  Hi all,
PN  
PN  I would like to know how a variable declared as
PN  double is represented with 
PN  avr-libc. What is the maximum and minimum values
PN  that it can represent and 
PN  with what resolution? I am performing floating point
PN  math which fails in 
PN  certain occasion where i think it shouldn't. Hence
PN  my query...
PN  
PN  For an example i have a double variable called
PN  TempDouble which is placed 
PN  at the following address in SRAM with each of the
PN  byte having the given 
PN  value. How do i interpret this value in decimal?
PN  
PN  Ram Address:  $0B6F   $0B70   $0B71   $0B72
PN  Value:00  50  91  3F
PN  
PN  Thanks in Advance.
PN  -- 
PN  Cheers!
PN  Kitts
PN  
PN  
PN  
PN  ___
PN  AVR-GCC-list mailing list
PN  AVR-GCC-list@nongnu.org
PN 
PN http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
PN  
PN 
PN 
PN __
PN Do You Yahoo!?
PN Tired of spam?  Yahoo! Mail has the best spam protection around 
PN http://mail.yahoo.com 
PN 
PN 
PN ___
PN AVR-GCC-list mailing list
PN AVR-GCC-list@nongnu.org
PN http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
PN 



___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


Re: [avr-gcc-list] double precision bit representation

2005-07-07 Thread Bjarne Laursen



Ram Address:$0B6F   $0B70   $0B71   $0B72
Value:  00  50  91  3F
 


I think this page is help full:
http://www.psc.edu/general/software/packages/ieee/ieee.html

I get it to 1.13525390625

-Bjarne Laursen, RoseTechnology A/S


___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


AW: [avr-gcc-list] double precision bit representation

2005-07-07 Thread Stumpf Michael
Title: AW: [avr-gcc-list] double precision bit representation





see http://babbage.cs.qc.edu/courses/cs341/IEEE-754hex32.html


:-Ursprüngliche Nachricht-
:Von: [EMAIL PROTECTED]
:[mailto:[EMAIL PROTECTED]
:nu.org]Im
:Auftrag von Bjarne Laursen
:Gesendet: Donnerstag, 7. Juli 2005 10:52
:Cc: avr-gcc-list@nongnu.org
:Betreff: Re: [avr-gcc-list] double precision bit representation
:
:
:
:Ram Address: $0B6F $0B70 $0B71 $0B72
:Value:  00   50  91 
: 3F
: 
:
:I think this page is help full:
:http://www.psc.edu/general/software/packages/ieee/ieee.html
:
:I get it to 1.13525390625
:
:-Bjarne Laursen, RoseTechnology A/S
:
:
:___
:AVR-GCC-list mailing list
:AVR-GCC-list@nongnu.org
:http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
:



___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


Re: AW: [avr-gcc-list] double precision bit representation

2005-07-07 Thread Kitts
Thanks Stumpf and Bjarne. Both of those pages are very helpful. It has made 
me more cautious about endianess!

Within my projects, i was going to implement a binary mode serial 
communication between dissimilar platforms. I will need to be careful with 
which byte i put/get out of the port first. I'll ensure a Most Significant 
Bit/Byte first. :-)

Thanks again.
-- 
Cheers!
Kitts

On Thursday 07 Jul 2005 8:09 pm IST, Stumpf Michael wrote:
SM see http://babbage.cs.qc.edu/courses/cs341/IEEE-754hex32.html
SM 
SM :-Ursprüngliche Nachricht-
SM :Von: [EMAIL PROTECTED]
SM :[mailto:[EMAIL PROTECTED]
SM :nu.org]Im
SM :Auftrag von Bjarne Laursen
SM :Gesendet: Donnerstag, 7. Juli 2005 10:52
SM :Cc: avr-gcc-list@nongnu.org
SM :Betreff: Re: [avr-gcc-list] double precision bit representation
SM :
SM :
SM :
SM :Ram Address:  $0B6F   $0B70   $0B71   $0B72
SM :Value:00  50  91  
SM :   3F
SM :  
SM :
SM :I think this page is help full:
SM :http://www.psc.edu/general/software/packages/ieee/ieee.html
SM :
SM :I get it to 1.13525390625
SM :
SM :-Bjarne Laursen, RoseTechnology A/S
SM :
SM :
SM :___
SM :AVR-GCC-list mailing list
SM :AVR-GCC-list@nongnu.org
SM :http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
SM :
SM 



___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


[avr-gcc-list] double precision bit representation

2005-07-06 Thread Kitts
Hi all,

I would like to know how a variable declared as double is represented with 
avr-libc. What is the maximum and minimum values that it can represent and 
with what resolution? I am performing floating point math which fails in 
certain occasion where i think it shouldn't. Hence my query...

For an example i have a double variable called TempDouble which is placed 
at the following address in SRAM with each of the byte having the given 
value. How do i interpret this value in decimal?

Ram Address:$0B6F   $0B70   $0B71   $0B72
Value:  00  50  91  3F

Thanks in Advance.
-- 
Cheers!
Kitts



___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list


Re: [avr-gcc-list] double precision bit representation

2005-07-06 Thread Parthasaradhi Nayani
Hello,

Currently avr-gcc supports only float and not double.
The byte pattern given in your query results in a
float value of -1.135254

Nayani P


--- Kitts [EMAIL PROTECTED] wrote:

 Hi all,
 
 I would like to know how a variable declared as
 double is represented with 
 avr-libc. What is the maximum and minimum values
 that it can represent and 
 with what resolution? I am performing floating point
 math which fails in 
 certain occasion where i think it shouldn't. Hence
 my query...
 
 For an example i have a double variable called
 TempDouble which is placed 
 at the following address in SRAM with each of the
 byte having the given 
 value. How do i interpret this value in decimal?
 
 Ram Address:  $0B6F   $0B70   $0B71   $0B72
 Value:00  50  91  3F
 
 Thanks in Advance.
 -- 
 Cheers!
 Kitts
 
 
 
 ___
 AVR-GCC-list mailing list
 AVR-GCC-list@nongnu.org

http://lists.nongnu.org/mailman/listinfo/avr-gcc-list
 


__
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 


___
AVR-GCC-list mailing list
AVR-GCC-list@nongnu.org
http://lists.nongnu.org/mailman/listinfo/avr-gcc-list