[Beowulf] Optimized math routines/transcendentals
C Bergström
cbergstrom at pathscale.com
Fri Apr 29 11:23:31 PDT 2016
Dear lazyweb,
I'm working on optimizing for a non-x86 target processor and left no
choice but to start writing optimized math functions.
So far I've compared
glibc
Sun solaris open sourced code
NetBSD mathlib (Which originated from Sun circa 1993)
netlib
{REDACTED-vendor-name} modified version of netlib
Surprisingly, glibc does a pretty respectable job in terms of
accuracy, but alas it's certainly not the fastest.
------------
One of the faster versions tested sometimes incorrectly
rounds for medium size and larger arguments, i.e. the least
significant bit differs from the other versions.
---
sin(6e5) =
bfcb40318b8c1728 vs
bfcb40318b8c1727 =
-0.212896531236929975605676 (REDACTED-vendor-name) vs
-0.212896531236929947850101 (nearest) vs
-0.212896531236929960235352 (higher precision) ...
-------
Question: Is the above acceptable to your scientific codes in general?
More information about the Beowulf
mailing list