Possible bad ROOT installation?

I’m just starting with root and while following the first steps of a root tutorial I found significant differences between the expected output and my installation’s output.

For example, with the input:
root [0] sqrt(42)

the expected output would be
(const double) 6.48074069840786038e+00

but I’m actually getting the following

(__gnu_cxx::__enable_if<true, double>::__type) 6.48074

I’m using root 6.08. Does anyone know why this might be happening?

Thanks in advance,
Pedro

Hi,

I think this output was obtained with an old ROOT version (based on CINT). I think your ROOT installation is fine, the output might depend on the compiler you are using which uses a different implementation of the sqrt function.
You can try to run some tutorials to check if your installation is fine

Best Regards

Lorenzo

Hi Pedro,

That was actually a bug / weird behavior in ROOT 6 versions: ROOT (or rather its C++ interpreter cling) stated the function return type even if it was a “weird” typedef. We now have

root [0] sqrt(42)
(double) 6.480741

Check e.g. 6.09/02 which does this correctly. Either way, as Lorenzo points out - everything is fine with your install!

Cheers, Axel.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.