Skip to content

grains:total impacted by rounding errors #106

@Gamecock

Description

@Gamecock

Becuase total is a float it is actually comparing:
`Error: Test failed: 'returns the total number of square on the board'

  • total() not equal to 1.844674e+19. If you use option(digits = 22) you can see:* total() not equal to 18446744073709551616.`

Test was supposed to be:
expect_equal(total(), 18446744073709551615)

See thread for more discussion. Do you want to teach bigInts and importing libraries this early in the track?

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions