Skip to content

Instantly share code, notes, and snippets.

View loraxx753's full-sized avatar

Kevin Baugh loraxx753

View GitHub Profile
@loraxx753
loraxx753 / zeta.js
Created February 16, 2018 04:09 — forked from bellbind/zeta.js
[javascript]complex arith and Riemann zeta function implementations
// Complex type
var Complex = function (real, imag) {
if (real instanceof Complex) return real;
imag = imag || 0;
return Object.freeze(Object.create(Complex.prototype, {
real: {value: real, enumerable: true},
imag: {value: imag, enumerable: true},
}));
};
Complex.fromPolar = function (r, theta) {