JSFiddle - React, Tailwind, and code Playground

by antelopelovefan

JavaScript

var pi = {
    nth: function(i) {
        return parseInt((0x1 / Math.pow(0x16, i)) * ( (0x4 / (Math.pow(0x8,i) + 0x1)) - (0x2 / (Math.pow(0x8,i) + 0x4)) - (0x1 / (Math.pow(0x8,i) + 0x5)) - (0x1 / (Math.pow(0x8,i) + 0x6)) ), 10);
    }
};

console.log(pi);

console.log(pi.nth(0x1));
console.log(pi.nth(0x2));
console.log(pi.nth(0x3));
console.log(pi.nth(0x4));
console.log(pi.nth(0x5));