How to use the bs-platform/lib/js/caml_int64.js.sub function in bs-platform

To help you get started, we’ve selected a few bs-platform examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github plow-technologies / bs-Zarith / lib / js / src / Z.js View on Github external
function ediv_rem$prime$2(_a, _b, _cum) {
  while(true) {
    var cum = _cum;
    var b = _b;
    var a = _a;
    var a$1 = Int64.abs(a);
    var b$1 = Int64.abs(b);
    var r = Caml_int64.sub(a$1, b$1);
    if (Caml_int64.compare(a$1, b$1) === 1) {
      _cum = Caml_int64.add(cum, Int64.one);
      _b = b$1;
      _a = r;
      continue ;
    } else {
      return /* tuple */[
              Caml_int64.add(cum, Int64.one),
              r
            ];
    }
  };
}
github plow-technologies / bs-Zarith / lib / js / src / Z.js View on Github external
function pred$2(x) {
  return Caml_int64.sub(x, Int64.one);
}
github plow-technologies / bs-Zarith / lib / js / src / Z.js View on Github external
function mod$1(a, n) {
  return Caml_int64.sub(a, Caml_int64.mul(n, Caml_int64.div(a, n)));
}