Hi Allister,
CINT does not accept calls to class member functions in initialisation
of const arrays.
You can change your initialisation to:
const Double_t sqrt3 = TMath::Sqrt(3.);
const Double_t phi[4] = {0., (1 + sqrt3)/2, (1 - sqrt3)/2, 0.};
const Double_t h[4] = {(1 + sqrt3)/4, (3 + sqrt3)/4,
(3 - sqrt3)/4, (1 - sqrt3)/4};
Also note that you do not need to modify your original function
replacing double by Double_t, sqrt(3) by TMath::Sqrt, etc.
Rene Brun
allister@malapacan.msuiit.edu.ph wrote:
>
> Hi,
>
> I wrote a macro both in g++ and ROOT (pls. see attached) to calculate a
> single value of a Daubechies building block/wavelet. When I do it in g++,
>
> $ g++ daubechies.C -o daub
> $ ./daub
>
> then input r = 1.125 (actually works well for a certain set of inputs) the
> results are:
>
> Phi( 1.125 ) = 0.620513 .
> Psi( 1.125 ) = -0.208133 .
>
> However, in ROOT 2.22/10,
>
> $ root daub_ROOT.C
>
> then input 1.125
>
> Phi( 1.125 ) = -1.53122e+06 .
> Psi( 1.125 ) = 2.28002e+06 .
>
> (int)0
> root [1]
>
> Could somebody tell me the reason for the difference?
>
> Thanks,
>
> ALLISTER LEVI C. SANCHEZ
> DEPARTMENT OF PHYSICS
> MSU - ILIGAN INSTITUTE OF TECHNOLOGY
> 9200 ILIGAN CITY
> PHILIPPINES
>
> Today's Line: Forgiveness! Oh what a way to solve memory leaks!
>
> ------------------------------------------------------------------------
>
> Name: daubechies.C
> daubechies.C Type: Plain Text (TEXT/PLAIN)
> Encoding: BASE64
> Description: macro in g++
>
> Name: daub_ROOT.C
> daub_ROOT.C Type: Plain Text (TEXT/PLAIN)
> Encoding: BASE64
> Description: macro in ROOT
This archive was generated by hypermail 2b29 : Tue Jan 04 2000 - 00:43:43 MET