avr-gcc-list
[Top][All Lists]
Advanced

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

AW: [avr-gcc-list] LIBRARY


From: Stumpf Michael
Subject: AW: [avr-gcc-list] LIBRARY
Date: Wed, 23 Jan 2002 07:38:18 +0100



> Michael,
>
> I saw this in the readme file:
>
>            A := R25:R24:R23:R22 with R25 holding sign and exponent, R22 LSB of mantissa
>            B := R21:R20:R19:R18 with R21 holding sign and exponent, R18 LSB of mantissa
> >
> It does not mention that the lsb of the exponent is in R24!!!
>  I assumed
> that it was a 7 bit exponent???
>
Oops, I assumed it was clear that a 32 bit IEEE floating point was passed. I just wanted to tell which of the
four regsiters holds the SEEEEEEE part and which is the 'other end'. It seemed obvious to me that R24 holds the
next portion (EMMMMMMM), then R23, then R22 holds the LSB of the mantissa.

Talking in binary :
Actually while testing the fplib I did something similar : I passed a unsigned number via RS232 to the AVR as a
hex string (e.g. "3F800000") and wrote that (after converting to a unsigned long) in place of a float (gives 1.0).
Worked perfectely well.

> Thanks,
>
>
> Glen
>

>
> > Stumpf Michael wrote:
> >
> > Hello,
> >
> > you must have got something wrong : avr-gcc uses IEEE
> >
> > IEEE: SEEEEEEE EMMMMMMM MMMMMMMM MMMMMMMM
> >
> > format with full accuracy. That means no bits lost until rounding is
> > done.
> > Why do you think avr-gcc uses a differing format?
> >
> > regards
> > Michael Stumpf
> >
> > >
> > > Hello,
> > >
> > > Being new to avr-gcc, how does one find a list of all the
> > > library functions
> > > available?  I have been searching through the source files,
> > > but that takes
> > > a
> > > lot of time.  Has anyone compiled a single document listing
> > > the prototypes
> > > and
> > > a brief explanation of the functions?
> > >
> > > I am going to use the mega128 on a project that needs trig,
> > > floating point,
> > > and
> > > a user port dedicated to one of the serial ports.  I need
> > > more information
> > > also
> > > on avr-gcc's IEEE floating point differences, for one of
> my external
> >
> > > devices
> > > speaks in IEEE floating point binary (32 bit).
> > >
> > > IEEE: SEEEEEEE EMMMMMMM MMMMMMMM MMMMMMMM
> > > GCC:  SEEEEEEE MMMMMMMM MMMMMMMM MMMMMMMM
> > > where S = sign bit, E = exponent, and M = mantissa
> > >
> > > This is what I see as the difference, any comments?
> > >
> > > Right now, I have done all the customer's coding in assembly
> > > on an 8535
> > > (including
> > > fp and trig in assembly) and we just filled the flash.
> > >
> > > Thanks,
> > >
> > > Glen Bankston
> > > Microsystems Engineering
> > > Moultrie, GA
> > >
> > > avr-gcc-list at http://avr1.org
> > >
>


reply via email to

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