Ratio of TF1's

I have two simple function f(x) and g(x) defined as TF1 pointers and well defined
TF1* f = new TF1( etcetc… );
TF1* g = new TF1( etcetc… );

How to obtain/draw e.g. their ratio
r(x)= f(x)/g(x)

(as a TF1* r object…)?


void fdiv() { TF1 *f1 = new TF1("f1","sin([0]*x+[1])",-1,1); f1->SetParameters(1.,0.1); TF1 *f2 = new TF1("f2","cos([0]*x+[1])",-1,1); f2->SetParameters(0.9,0.5); TF1 *f3 = new TF1("f3","f1/f2",-1,1); f3->Draw(); }

see restrictions in TF1 doc