Skip to content

Instantly share code, notes, and snippets.

@brenapp
Created February 2, 2019 00:06
Show Gist options
  • Save brenapp/76f769bd5dbe118c417a206e95193b57 to your computer and use it in GitHub Desktop.
Save brenapp/76f769bd5dbe118c417a206e95193b57 to your computer and use it in GitHub Desktop.
int LOGISTIC[] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 25, 26, 27, 28, 29, 31, 32, 33, 34, 35, 37, 38, 39, 41, 42, 44, 45, 46, 48, 49, 51, 52, 54, 56, 57, 59, 60, 62, 64, 65, 67, 68, 70, 71, 73, 75, 76, 78, 79, 81, 82, 83, 85, 86, 88, 89, 90, 92, 93, 94, 95, 96, 98, 99, 100, 101, 102, 103, 104, 105, 106, 107, 107, 108, 109, 110, 110, 111, 112, 113, 113, 114, 114, 115, 115, 116, 116, 117, 117, 118, 118, 119, 119, 119, 120, 120, 120, 121, 121, 121, 122, 122, 122, 122, 122, 123, 123, 123, 123, 123, 124, 124, 124, 124, 124, 124, 124, 125, 125, 125, 125 };
int logistic(int n) {
return sgn(n) * LOGISTIC[abs(n)];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment