Skip to content

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

Closed
@chiroptical

Description

@chiroptical

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions