-->
Page 1 of 2

Anyone else notice __ieee754_sqrt() is missing from libm.a?

PostPosted: Mon Apr 20, 2015 3:43 am
by Kevin Uhlir (N0BEL)
It is used by sqrt(), which in turn is used by pow(), which I'd like to use.

Just an fyi, sqrtf() and powf() work, because __ieee_sqrtf() is in there (the single precision float versions).

Just to see if its in a newer library, i've even looked at libm.a from the recently released Arduino build environment.

Any pointers are appreciated.

/Kevin

Re: Anyone else notice __ieee754_sqrt() is missing from libm

PostPosted: Mon Apr 20, 2015 9:40 am
by jcmvbkbc
Kevin Uhlir (N0BEL) wrote:Any pointers are appreciated.

It's been fixed recently: https://github.com/jcmvbkbc/crosstool-N ... d1937431cd , viewtopic.php?f=9&t=1662
Rebuild your toolchain.

Re: Anyone else notice __ieee754_sqrt() is missing from libm

PostPosted: Mon Apr 20, 2015 12:02 pm
by Kevin Uhlir (N0BEL)
Thank you. I was hoping to avoid a toolchain compile, since I've not done one yet, and been relying on provided libraries.

Anyone have a newer compile of the libraries done? Anyone have a pointer to it?

Any help is appreciated.

Thanks,
/Kevin

Re: Anyone else notice __ieee754_sqrt() is missing from libm

PostPosted: Tue Apr 21, 2015 4:06 pm
by Kevin Uhlir (N0BEL)
I did go and pull crosstool-ng (https://github.com/jcmvbkbc/crosstool-NG) lx106-g++ branch, and did the compile and came up with a corrected libm.a, thanks!

Something else I did to the library, for my own purposes:
objcopy --rename-section .text=.irom0.text --rename-section .literal=.irom0.literal libm.a

This allows me to use every math function in my app, without overflowing the iram segment. YAY!

People say its slower, that may be, but I can get, for example, over 10,000 sin() calculations per second, which is well fast enough for what I'm working on.

/Kevin