Commits

arkdro committed 7624786

adding operations. divide

  • Participants
  • Parent commits 40a9b06

Comments (0)

Files changed (1)

   | Eterm.ET_bignum x -> x
 
 let handle_payload = function
+    | Eterm.ET_tuple [|(Eterm.ET_atom "divide"); Eterm.ET_bignum n1; Eterm.ET_bignum n2;|] ->
+      Trace.dbg "handle_payload" "divide bignums\n%s\n%s\n%!"
+        (Num.string_of_num n1) (Num.string_of_num n2);
+      let res = Num.div_num n1 n2 in
+      Eterm.ET_bignum res
     | Eterm.ET_tuple [|(Eterm.ET_atom "subtract"); Eterm.ET_bignum n1; Eterm.ET_bignum n2;|] ->
       Trace.dbg "handle_payload" "subtract bignums\n%s\n%s\n%!"
         (Num.string_of_num n1) (Num.string_of_num n2);