Created
January 13, 2013 16:06
-
-
Save ghalimi/4524836 to your computer and use it in GitHub Desktop.
ERF Function
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
// Copyright (c) 2012 Sutoiku, Inc. (MIT License) | |
function ERF(lower_bound, upper_bound) { | |
// Set number2 to zero if undefined | |
upper_bound = (typeof upper_bound === 'undefined') ? 0 : upper_bound; | |
// Return error if either number is not a number | |
if (isNaN(lower_bound) || isNaN(upper_bound)) return '#VALUE!'; | |
// Return ERFC using jStat [http://www.jstat.org/] | |
return jStat.erf(lower_bound); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment