Created
November 11, 2011 20:12
-
-
Save rramsden/1359090 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
-module(test). | |
-compile(export_all). | |
-define(MILLISECONDS, 1).· | |
-define(SECONDS, 1000*?MILLISECONDS). | |
-define(MINUTES, 60*?SECONDS). | |
start() -> | |
io:format("minutes is ~p~n", [?MINUTES]), | |
io:format("is minutes an interger? ~p~n", [is_integer(?MINUTES)]), | |
io:format("(100*250)/~p = ~p~n", [?MINUTES, (100*250) / ?MINUTES] ), | |
io:format("(100*250)/~p = ~p~n", [60000, (100*250) / 60000] ). | |
2> test:start(). | |
minutes is 60000 | |
is minutes an interger? true | |
(100*250)/60000 = 416666.6666666667 | |
(100*250)/60000 = 0.4166666666666667 | |
ok |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment