aboutsummaryrefslogtreecommitdiff
path: root/challenge-006/zapwai/javascript/ch-2.js
blob: 1532859946a4b1805553e596ca4d21429c16287a (plain)
1
2
3
4
5
6
7
8
9
10
Decimal.set({ precision: 35 });
const x = new Decimal("163");
const pi = new Decimal("3.141592653589793238462643383279502884197169");
const r = pi.times(x.sqrt());
const e = new Decimal("2.7182818284590452353602874713526624977572");
const result = e.pow(r);
console.log(result.toString());

// Add this line to the html file to include the Decimal library:
// <script src="https://cdnjs.cloudflare.com/ajax/libs/decimal.js/10.3.1/decimal.min.js"></script>