Skip to content

Impossible to test equality of floating point numbers #83

Open
@jewiet

Description

@jewiet

Hey!

Thanks for the tool.

I want to use elm-verify-examples to test a function that returns a float. It seems impossible to test equality of floating point numbers, even if they are strictly equal. Consider the following example:

0.1 --> 0.1

With this I am getting the following message: Do not use Expect.equal with floats. Use Float.within instead.

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions