>    I tried to have as evalf() just the last line, but the test cases faile,
>    because we not always want to change for instance sec(x) into 1/cos(x) for
>    eval.
> 
>    Another example sec(x+2*pi) should evaluate to sec(x) and not 1/cos(x).

Indeed, that's for periodic stuff.  There is some redundancy
here too (I mean between sin/cos/etc and your base class
for reciprocal functions).  But this may be not easy to fix, so it's ok.