Last active
January 19, 2018 00:10
-
-
Save stereobooster/62ae67886f284380246028108a000bd5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (text) | |
account = 2 / 0 | |
main = | |
text ( | |
toString | |
(account + 1) | |
) | |
-- Infinity |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (text) | |
main = | |
text ( | |
toString( | |
sqrt(-1) | |
) | |
) | |
-- NaN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (text) | |
inf = (1/0) | |
x = 10 / inf | |
y = 1000 / inf | |
main = | |
text ( | |
toString( | |
x == y | |
) | |
) | |
-- True |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (text) | |
inf = (1/0) | |
nan = sqrt(-1) | |
main = | |
text ( | |
toString( | |
inf + nan | |
) | |
) | |
-- NaN |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (text) | |
main = | |
text ( | |
toString | |
[ | |
isNaN (0/0), | |
isNaN (sqrt -1), | |
isNaN (1/0), | |
isNaN 1, | |
isInfinite (0/0), | |
isInfinite (sqrt -1), | |
isInfinite (1/0), | |
isInfinite 1 | |
] | |
) | |
-- [True,True,False,False,False,False,True,False] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import Html exposing (text) | |
inf = 1/0 | |
mininf = logBase 1 0 | |
nan = 0/0 | |
main = | |
text ( | |
toString | |
[ | |
nan < inf, | |
nan > inf, | |
nan < mininf, | |
nan > mininf, | |
nan < nan, | |
nan > nan, | |
nan == nan, | |
inf == inf, | |
mininf == mininf | |
] | |
) | |
-- [False,True,False,True,False,True,False,True,True] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment