0x7676
v1.4.0
Published
this package is likely to be compatible on everything, idk man, havent tested it anywhere else other than nodejs and chrome lmfao
Readme
"0x"+require("0x7676")(4,16).toString(16)
any base update!
this package is likely to be compatible on everything, idk man, havent tested it anywhere else other than nodejs and chrome lmfao
anyways, this is just a package which generates 76 repeating for l digits for base-b.
docs
seventysix(l, b) (Number/BigInt)
args
l(Number/BigInt): amount of base-bdigits. for example,l=5would give5digits in base-b.b(Number/BigInt): the output's base; ifb< 8, returns NaNn(Boolean): enable bigint support (optional, default isfalse). this option is only here for backwards compatability.
if any of the args is 0 or NaN, the function returns NaN
examples
console.log(seventysix(4, 8)) // should log 4030
console.log(seventysix(4, 10)) // should log 7676
console.log(seventysix(4, 16)) // should log 30326
console.log(seventysix(4, 32)) // should log 235750
console.log(seventysix(4, 76)) // should log 3108026
console.log(seventysix(0, 8)) // should log NaN
console.log(seventysix(4, 0)) // should log NaN
console.log(seventysix(0, 0)) // should log NaN
console.log(seventysix(NaN, 8)) // should log NaN
console.log(seventysix(4, NaN)) // should log NaN
console.log(seventysix(NaN, NaN)) // should log NaN
console.log(seventysix(0, NaN)) // should log NaN
console.log(seventysix(NaN, 0)) // should log NaN
console.log(seventysix(10, 16, true)) // should log 508793615990nhow to import?
browsers
use some cdn like jsdelivr or unpkg, idc, but for these examples im using jsdelivr.
you can use it in a <script> tag:
<script src="https://cdn.jsdelivr.net/npm/0x7676@latest"></script>nodejs
$ npm i 0x7676
yeah i totally installed itseventysix = require("0x7676")es6 imports (extra spicyness)
import seventysix from "https://cdn.jsdelivr.net/npm/0x7676@latest/index.mjs"
// ...or... (assuming we are in an async env)
seventysix = await import("https://cdn.jsdelivr.net/npm/0x7676@latest/index.mjs")i dont think this will work in node tho but idk u never know
"why does this wretched puke of obusfucated, minimalized and shittified code even work?!?!"
well if you would've looked a bit more, you could've realised that the following math equation is the only thing that powers this package along with suffering and duct tape:
((7b+6)*(b^l))/(bb-1)
the first part, (7b+6), creates the number 76 for base b. lets see how this works: base-10 76, can be represented as 7*10+6. now, replace 10 with b and that's how it works.
then, the b^l part. this is like doing 10^2 to get 100 or 10^100 to get a googol (wow!). again, replace 10 with b and we've now got base-b going.
then finally, bb-1. the trick to make this whole package going is that (76(10^n))/99 gets you infinite 76s for n length. now, for base 10, 99 can be represented as 10*10-1. after the replacement, we also have base-n.
after running the equation, you may or may not see decimals in the result. this is easily countered by a floor operation which eliminates all decimals.
