摘要: 在erlang的API中,erlang:trunc/1 是就近取整,erlang:round/1是四舍五入的,整理下:对于正数的向上和向下取整,1 %% 向上取整2 ceil(N) ->3 T = trunc(N),4 case N == T of5 true ... 阅读全文
posted @ 2014-06-25 12:41 孤独信徒 阅读(4519) 评论(0) 推荐(0)