Last active
January 3, 2016 18:19
-
-
Save cohalz/8501390 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
let doll_of_yen yen = | |
let rate = 114.32 in | |
let doll = float_of_int(yen) /. rate in | |
if int_of_float(doll *. 1000.0) mod 10 < 5 then floor(doll*.100.0)/.100.0 else floor((doll+.0.01)*.100.0)/.100.0 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment