AVR C Runtime Library - Bugs: bug #10413, speedup tanh function in libm
You are not allowed to post comments on this tracker with your current authentication level.
bug #10413: speedup tanh function in libm
Submitter: | None | ||
Submitted: | Thu 16 Sep 2004 02:41:26 PM UTC | ||
Category: | Library | Severity: | 3 - Normal |
Priority: | 7 - High | Item Group: | None |
Status: | None | Assigned to: | None |
Percent Complete: | 0% | Originator Email: | -email is unavailable- |
Open/Closed: | Closed | Release: | None |
Fixed Release: | None |
Attached Files
file #1772: tanh.S added by None (4KiB - application/octet-stream - my version using the corrected other variant to calculate tanh)
Depends on the following items: None found
Items that depend on this one: None found
CC list is empty
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2004-12-22 | arcanum | Reassign Item | From group AVR C Runtime Library, bugs tracker | To group AVR C Runtime Library, patch tracker | |
2004-12-22 | arcanum | Priority | 5 - Normal | 7 - High | |
2004-09-16 | None | Attached File | - | Added tanh.S, #1676 |
Powered by Savane 3.13-d3ae.
Corresponding source code
The current code uses sinh/cosh which results in 2 calls to exp (each function calls it once) where the other variant (commented out in tanh.S) would only need it once. (it would also save 2 calls of inverse and 1 of ldexp and saves memory by not needing cosh/sinh)
The problem is the other code has a bug. It gives to the ldexp function an 1-byte-parameter where it should be 2 bytes. (see the 2 lines before the call of ldexp.)
Appended is a file which uses this other variant and has this bug fixed. (It speedsup my application which uses tanh extensively about 40%.)