Skip to content
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

Getting a failure on these tests that is very strange #49

Closed
chiroptical opened this issue Feb 24, 2022 · 1 comment
Closed

Getting a failure on these tests that is very strange #49

chiroptical opened this issue Feb 24, 2022 · 1 comment

Comments

@chiroptical
Copy link

it "Should take cubed root" $ do
3 `shouldBe` cbrt @Double 27
it "Should take square root" $ do
2 `shouldBe` sqrt @Double 4

I am not sure this is entirely helpful, feel free to close. I would like to use arrayfire for a project I am starting. It is included in my nix setup via https://github.com/chiroptical/homing-pigeon/blob/main/default.nix.

However, I am getting errors from these tests after setting my LD_LIBRARY_PATH appropriately. Here is the output from the test,

  test/ArrayFire/ArithSpec.hs:31:7: 
  1) ArrayFire.Arith, Arith tests, Should take cubed root
       expected: ArrayFire Array
                 [1 1 1 1]
                     3.0000 
                 
        but got: ArrayFire Array
                 [1 1 1 1]
                     3.0000 

I am wondering if it is comparing the pointers and not doing an element-wise comparison? AFAICT, I tried some C++ code and arrayA == arrayB seems to generate an element-wise comparison but I am unsure how equals is handled in Haskell-land.

@leftaroundabout
Copy link
Contributor

This is not really a failure, just a harmless float-inexactness. Addressed in #59.

@dmjio dmjio closed this as completed May 4, 2024
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

No branches or pull requests

3 participants