Skip to content
Subhajit Sahu edited this page Sep 4, 2021 · 7 revisions

Gives square root of value.
📦 NPM, 😺 GitHub, 🏃 RunKit, 🌔 Minified, 📜 Files, 📰 JSDoc, 📘 Wiki.


bigint.sqrt(x);
// x: a bigint
const bigint = require('extra-bigint');

bigint.sqrt(16n, 2n);
// 4n

bigint.sqrt(15n, 2n);
// 3n

bigint.sqrt(-16n, 2n);
// null


References

Clone this wiki locally