> From: Raymond Toy <toy at rtp>
> Date: 25 Sep 2001 09:53:01 -0400
>
> Boris> Like this:
>
> Boris> tellsimp(cn1(0),1);
> Boris> tellsimp(sn1(0),0);
>
> Thanks1 That works. However, what if I want sn1(.5, .8) to give me
> some number? I don't know how to do that.
Easy. This will substitute sn1 by the original sn iff both arguments
are numerical:
(C46) matchdeclare(x,numberp);
(D46) DONE
(C47) matchdeclare(y,numberp);
(D47) DONE
(C48) tellsimp(sn1(x,y),sn(x,y));
(D48) [sn1RULE1, FALSE]
(C49) sn1(0.8,0.5);
(D49) 0.69093485086644
(C50) sn1(0.8,x);
(D50) sn1(0.8, x)
(C51)
Note, that I use sn for the original float-point function. Since you
redefined it, you probably need to use fp_sn here.
Also, if you want your own rules to apply before numerical evaluation,
you might want to use tellsimpafter instead of tellsimp in (c48)
above.
--
Good luck
-Boris