bomben
November 3, 2017, 2:50pm
1
Dear all,
what I want to report is a rather annoying feature (if not a bug):
$ root
------------------------------------------------------------
| Welcome to ROOT 6.11/01 http://root.cern.ch |
| (c) 1995-2017, The ROOT Team |
| Built for macosx64 |
| From tag v6-09-02-2657-g9339de9e64, 18 May 2017 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------
Applying ATLAS style settings...
root [0] double Cdep = 1.65428e-12
(double) 0.000000
root [1] Cdep
(double) 0.000000
root [2] Cdep/1e-12
(double) 1.654280
Is it normal that my variable is presented as consistent with 0?
Luckily the correct value it is still there.
Am I missing something?
Best regards,
Marco Bomben
couet
November 3, 2017, 3:33pm
2
$ root
----------------------------------------------------------------
| Welcome to ROOT 6.11/03 http://root.cern.ch |
| (c) 1995-2017, The ROOT Team |
| Built for macosx64 |
| From heads/master@v6-11-02-590-g814f647, Nov 03 2017, 15:38:50 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
----------------------------------------------------------------
root [0] double Cdep = 1.65428e-12;
root [1] printf("%g\n",Cdep);
1.65428e-12
root [2]
bomben
November 3, 2017, 4:04pm
3
Thanks. Still rather annoying in my opinion.
Regards,
Marco Bomben
couet
November 3, 2017, 4:05pm
4
ROOT command line is interpreted C++ . You should type C++.
bomben
November 3, 2017, 4:24pm
5
I see, but few months ago it was different:
$ root
------------------------------------------------------------
| Welcome to ROOT 6.08/06 http://root.cern.ch |
| (c) 1995-2016, The ROOT Team |
| Built for linuxx8664gcc |
| From tag v6-08-06, 2 March 2017 |
| Try '.help', '.demo', '.license', '.credits', '.quit'/'.q' |
------------------------------------------------------------
root [0] double Cdep = 1.6e-12
(double) 1.60000e-12
root [1] Cdep
(double) 1.60000e-12
root [2]
couet
November 3, 2017, 4:38pm
6
Ok. I am sure @Axel tell more about it.
tbis
November 3, 2017, 5:07pm
7
I guess it’s due to this change:
to:
To be honest, it would be great to have something like std::setprecision for the output stream within cling, but the implementation seems to work with normal strings and not streams which seems a bit unfortunate
Axel
November 3, 2017, 8:24pm
8
I agree that’s bad; I’ll fix it at least for 6.12: https://github.com/root-project/root/pull/1278
If you want setprecision just use it You can always use printf or the iostream manipulators from the prompt. But we should still get the default right and sensible.
bomben
November 4, 2017, 8:12am
9
Thanks a lot you all for the feedback!
Best regards,
Marco Bomben