Re: [ROOT] exponential fit

From: Falk Karstens (falcone@mail.desy.de)
Date: Wed Mar 17 2004 - 15:19:20 MET


Dear Axel,

it is true, but with a*(x-const)**(0.5) or a*pow(x-const,0.5) or
a*TMath::Power(x-const,0.5) I have got the same problem.
At the end I figured out that negative arguments for roots cause the
problem even in
positive subrange fit. I defined a user defined function where I check
negative arguments. This solved the problem.

Thanks,

Falk

On Tue, 16 Mar 2004, Axel Naumann wrote:

> Hi Falk,
>
> >(2) a*(x-const)^(1/2)
> >what DOES NOT give a fit.
> >
> >
> No wonder, it's latex and fortran, but not c(++) :-] There are two
> problems with this expression: 1/2 evaluates to 0, and the operator ^ is
> not defined the way you want it. Grab a c(++) manual and have a look.
> Axel.
>
>

++++++++++++++++++++++++++++++++++++++++++++++++++++
+  Falk Karstens                                   +
+  Abt. Prof. A. Bamberger/ Universit"at Freiburg  +
+  Zimmer 1d/148                                   +
+  Tel. ++49 (0) 40 - 8998 3346                    +
+  Fax  ++49 (0) 40 - 8998 3092                    +
++++++++++++++++++++++++++++++++++++++++++++++++++++
+  Deutsches Elektronensynchrotron, DESY           +
+  Notkestr. 85                                    +
+  D-22603 Hamburg, Germany                        +
++++++++++++++++++++++++++++++++++++++++++++++++++++



This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET