This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RFC Power PC G3 optimized sqrtf function.


Hi everybody,

This is my 1st post and attempt at contributing to glibc

I have written a sqrtf function that is much faster on a PowerPC G3 than the original one used. It uses the frsqrte instruction and Newton Goldschmidt iterations to get a result. I have had testing done on G3 and G4 processors and it has results that conform to ieee . Testing on G5's has shown it gets within at least 2 bits of the correct answer. This shouldn't matter because the G5 has a hardware sqrtf instruction. It may work on 603, 603e, 604, and 604e processors as well but I have not tested on them. It will not work on a 601 processor.

The limiting factor on ieee conformance is the frsqrte instruction must produce a result that is within 1/59th of the correct value. A timing test on all valid values using the current glibc function takes about 26 minutes on a iMac g3 400MHz machine. With my implementation it takes about 21 minutes.

Please read the header for more details and give me some feedback.

P.S. Do I need to file copyright assignment papers for this?

Thanks,

Conn


---------------------------------------
Conn Clark


Electronic Systems Technology
415 N. Quay Street Building B1 (509)-735-9092 ext 117
Kennewick, WA. 99336


Gentoo Linux RU13$!!!

Attachment: e_sqrtf.S
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]