Skip to content

Conversation

@steffenlarsen
Copy link
Contributor

The current implementation of the tanh function for the SYCL complex extension did not always return values precise enough, neither on device nor on host. This was caused by accumulated error from a call to cos. This commit changes the implementation of tanh to use a different way of calculating the result and tests it against std::tanh for complex numbers.

@sarnex
Copy link
Contributor

sarnex commented Nov 13, 2025

@steffenlarsen Sorry, please rebase on top of HEAD before re-running WIndows CI, it has a fix to prevent breaking Windows build runners. Thanks

The current implementation of the tanh function for the SYCL complex
extension did not always return values precise enough, neither on
device nor on host. This was caused by accumulated error from a call
to cos. This commit changes the implementation of tanh to use a
different way of calculating the result and tests it against std::tanh
for complex numbers.

Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Signed-off-by: Larsen, Steffen <steffen.larsen@intel.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants