This is an archive of the discontinued LLVM Phabricator instance.

Simple sqrt implementation for sphereflake
ClosedPublic

Authored by rengolin on May 8 2014, 4:34 AM.

Details

Summary

Reports about different results depending on which GCC was used to run the test-suite have prompted me to implement sqrt() as a simple function to avoid library issues. The results on x86_64, ARM and AArch64 are identical, even across Clang and GCC 4.8.

The new implementation should be safe for values between 10^-10 and 10^10. For this particular case, though, it's more than enough.

The images remained pretty. ;)

Diff Detail

Event Timeline

rengolin updated this revision to Diff 9208.May 8 2014, 4:34 AM
rengolin retitled this revision from to Simple sqrt implementation for sphereflake.
rengolin updated this object.
rengolin edited the test plan for this revision. (Show Details)
rengolin added a reviewer: ddunbar.
rengolin set the repository for this revision to rL LLVM.
rengolin added subscribers: Unknown Object (MLST), robertlytton, HaoLiu, t.p.northover.

Btw, I'm also moving the LLVM block up, as you have noticed. ;)

ddunbar edited edge metadata.May 8 2014, 10:27 AM

This seems reasonable, given the primary intent of these tests. The only
problem I see with this is that there is actually some value in testing the
compiler's handling of the real sqrt(), but that is something probably more
properly done by specific functional tests written by someone with a very
good idea of exactly what is allowed.

  • Daniel

Hi Daniel,

I agree. I did some functional testing (around nan, inf, and representative values), but that was far from complete or accurate.

Also, this is a task for gcc/glibc guys, since it was a specific version of Linaro GCC that broke and not the next.

But I was meaning to do that anyway, to de-couple GCC bugs with the test-suite.

Thanks!
--renato

rengolin accepted this revision.May 9 2014, 1:04 AM
rengolin added a reviewer: rengolin.
This revision is now accepted and ready to land.May 9 2014, 1:04 AM
rengolin closed this revision.May 9 2014, 1:04 AM