Skip to content
Subhajit Sahu edited this page Jun 24, 2020 · 7 revisions

Gives square root of value. 🏃 📼 📦 🌔 📒

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