crossbind
GitHub

Numbers

int, double and bool arrive as numbers and booleans. A 64-bit integer arrives as a BigInt, so no digit goes missing.

A JavaScript Number is exact only up to 2^53. fibonacci(90) is larger, so its int64_t result crosses as a BigInt; turning it into a Number shows the digits a double would lose.

A 64-bit parameter takes a BigInt or a whole Number. An argument of the wrong type, a string for an int say, throws a TypeError instead of crossing as 0.

Try it
Print typeof each result, then call isEven('ten') inside a try and print the error.
Open in playground
Runs without a compile until the C++, Rust, packages or imports change.
Press Run, or Ctrl+Enter, to run main.js.
Type to search every guide page and section.
↑↓ navigate↵ openesc close