Hi Eddie,
On Wed, 2006-03-29 at 12:16 -0700, Eddie Dawydiuk wrote:
> > No, not directly, however the glibc version of _dtoa that the gnu
> > classpath from java calls seems to be wonky
> >
> > I get numbers like 25.0000000876 for 25.0
>
> In the past people have had problems with using different version of
> gcc when crosscompiling. Also there was a problem with glibc about
> a year ago that has been corrected...
>
> So if you run the following program what is the output?
>
>
> #include <stdio.h>
> int main(int argc, char **argv) {
>
> double d = 25.0;
> printf("25.0 = %10.10f\n",d);
> return 0;
> }
I Get
$ ./test
25.0 = 25.0000000000
But if I run:
#include <stdio.h>
#include <stdlib.h>
int main(int argc, char **argv) {
double d = strtod("25.0", NULL);
printf("25.0 = %10.10f\n",d);
return 0;
}
I Get:
$ ./test
25.0 = 0.0000000000
Software and Hardware:
$ uname -a
Linux aptwo 2.4.26-vrs1-cirrus-1-2-1-ts8 #1 Mon Mar 7 09:55:33 MST 2005
armv4l unknown
Armgcc crosstools on my PC:
$ arm-linux-gcc -v
Reading specs
from
/usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/lib/gcc-lib/arm-linux/3.3.4/specs
Configured
with:
/home/liberty/work_stuff/xtool/crosstool-0.28-rc37/build/arm-linux/gcc-3.3.4-glibc-2.3.2/gcc-3.3.4/configure
--target=arm-linux --host=i686-host_pc-linux-gnu
--prefix=/usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2
--with-headers=/usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/arm-linux/include
--with-local-prefix=/usr/local/opt/crosstool/arm-linux/gcc-3.3.4-glibc-2.3.2/arm-linux
--disable-nls --enable-threads=posix --enable-symvers=gnu
--enable-__cxa_atexit --enable-languages=c,c++ --enable-shared --enable-c99
--~/workplace/testenable-long-long
Thread model: posix
gcc version 3.3.4
I hope this will help you
Thanks
Etienne
>
> I've also included a binary to help troubleshoot the problem...
>
> //Eddie
>
> > On 24-Mar-06, at 7:44 PM, Yan Seiner wrote:
> >
> >> Has anyone worked with floating point on this board? I am
> >> experiencing some problems - getting garbage and segfaults while
> >> using floating point math - and I want to eliminate the kernel
> >> emulation code as a possible source.
> >>
> >> I doubt it is the kernel code, but I want to make sure....
> >>
> >> --Yan
> >>
> >>
> >>
> >>
> >>
> >>
> >> Yahoo! Groups Links
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >>
> >
> >
> >
> >
> > Yahoo! Groups Links
> >
> >
> >
> >
> >
> >
> >
>
>
> Yahoo! Groups Links
>
>
>
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|