Skip to content

Instantly share code, notes, and snippets.

@sushant-hiray
Last active August 29, 2015 14:01
Show Gist options
  • Save sushant-hiray/b7cc24e7874154560aaa to your computer and use it in GitHub Desktop.
Save sushant-hiray/b7cc24e7874154560aaa to your computer and use it in GitHub Desktop.
RCP<const Basic> eval(const RCP<const Basic> &arg)
{
if (eq(arg, zero)) return zero;
bool check;
RCP<const Integer> n;
RCP<const Basic> r;
check = get_pi_shift(arg, outArg(n), outArg(r));
if (check) {
int index;
index = n->as_int();
return sin_table[index % 24];
}
else
return rcp(new Sin(arg));
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment