• homura1650@lemmy.world
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    11 months ago

    No. The alternative is to not use a float. Testing if a float is even simply does not make sense.

    Even testing two floats for equality rarely makes sense.

    What is the correct output of isEven((.2 + .4) ×10)

    Hint: (.2 + .4) x 10 != 6