Skip to content

Instantly share code, notes, and snippets.

@tim2CF

tim2CF/round.hs Secret

Created January 24, 2022 14:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tim2CF/e63c7ff792e26362f356e71c47319494 to your computer and use it in GitHub Desktop.
Save tim2CF/e63c7ff792e26362f356e71c47319494 to your computer and use it in GitHub Desktop.
Prelude Numeric.Natural Data.Ratio> round (4000 % 1 :: Ratio Natural) :: Natural
*** Exception: arithmetic underflow
Prelude Numeric.Natural Data.Ratio> round (4000 % 1 :: Rational) :: Natural
4000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment