Skip to content

Fix (**) and use property tests for Floating #57

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Aug 25, 2023

Conversation

twesterhout
Copy link
Contributor

The default implementation of (**) relied on log and incorrectly
handled some inputs. The fix is making an explicit implementation
using the pow function.

To test the changes, tests for functions from the Floating typeclass
are re-written using property tests. There are a few helper functions
to make writing the actual properties easy.

More tests can be converted to properties, but this is left for
another PR.

This PR is based on #56. I'll rebase on master once #56 is merged.

P.S. @dmjio I hope you don't mind the frequent PRs. I'm trying to use ArrayFire in a project and fixing/implementing stuff as I encounter problems.

The default implementation of (**) relied on log and incorrectly
handled some inputs. The fix is making an explicit implementation
using the pow function.

To test the changes, tests for functions from the Floating typeclass
are re-written using property tests. There are a few helper functions
to make writing the actual properties easy.

More tests can be converted to properties, but this is left for
another PR.
@twesterhout
Copy link
Contributor Author

This is now rebased on master with #56 merged.

@dmjio
Copy link
Member

dmjio commented Aug 25, 2023

I hope you don't mind the frequent PRs. I'm trying to use ArrayFire in a project and fixing/implementing stuff as I encounter problems.

No this is very exciting, thank you for doing this.

More tests can be converted to properties, but this is left for
another PR.

Awesome.

@dmjio dmjio merged commit 971bae0 into arrayfire:master Aug 25, 2023
@twesterhout twesterhout deleted the arith branch August 25, 2023 15:10
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