Last active
December 19, 2016 09:22
-
-
Save mikaturk/b5aa50747d2280793e06ccd66162ffe8 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function riemann(f, xmin, xmax, step) { | |
let total = 0; | |
for (let i = xmin/step; i<xmax/step; i++) { | |
total += f(i*step)*step; | |
} | |
return total; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment