[erlang-questions] Where is fmod in Erlang?

Zhongzheng Liu liuzhongzheng2012@REDACTED
Fri Oct 21 05:09:54 CEST 2016


Hi mail-list:

How to calculate fmod in Erlang ?

fmod (5.3 , 2)  is 1.300000
fmod (18.5 , 4.2)  is 1.700000


Here is fmod in C/C++:

http://www.cplusplus.com/reference/cmath/fmod/


Currently I use nif to wrap fmod for Erlang. Is here a more convenient method?


Thanks

Liu Zhongzheng



More information about the erlang-questions mailing list