Last active
August 29, 2015 14:01
-
-
Save sushant-hiray/b7cc24e7874154560aaa to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| 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