[ROOT-8105] TFormula does not always handle 'gaus' correctly. Created: 05/Apr/16  Updated: 09/Aug/16  Resolved: 08/Aug/16

Status: Closed
Project: ROOT
Component/s: Math Libraries
Affects Version/s: 6.06/02
Fix Version/s: 6.08/00, 6.06/08

Type: Bug Priority: Blocker
Reporter: Lynn Garren Assignee: Lorenzo Moneta
Resolution: Fixed Votes: 0
Labels: None





As demonstrated below TFormula no longer support "(1-gaus)" (But still support many other usage of 'straight' 'gauss'):

root [1] f = new TF1("test","(1-gaus(0))*[0]",0,1)
(TF1 *) 0x7f9bd1dfadc0
root [2] f = new TF1("test","gaus*[0]",0,1)
(TF1 *) 0x7f9bd3c04b30
root [3] f = new TF1("test","1+gaus*[0]",0,1)
(TF1 *) 0x7f9bd1cb0110
root [4] f = new TF1("test","1-gaus*[0]",0,1)
(TF1 *) 0x7f9bd1e24970
root [5] f = new TF1("test","(1-gaus)*[0]",0,1)
input_line_31:1:82: error: use of undeclared identifier 'gaus'
Double_t TFormula____id16595312676895837307(Double_t *x,Double_t *p){ return (1-{gaus})*p[0] ; }
Error in <TFormula::Eval>: Can't find TFormula____id16595312676895837307 function prototype with arguments Double_t*,Double_t*
Error in <TFormula::ProcessFormula>: "gaus" has not been matched in the formula expression
Error in <TFormula::ProcessFormula>: Formula "(1-gaus)*[p0]" is invalid !
(TF1 *) 0x7f9bd3c0b7e0

Philippe, Lynn, Paul.

Comment by Lorenzo Moneta [ 20/Apr/16 ]

This bug is now fixed in the ROOT master version. Thank you for reporting it


Comment by Gianluca Petrillo [ 08/Aug/16 ]

The fix shows in the tag v6-06-04, but it does not show up in any of the source distributions (neither 6.06/04 nor 6.06/06).
Am I missing anything?

Comment by Philippe Canal [ 08/Aug/16 ]

The fix has been uploaded to the v6.06 patch branch and the field "Fix Version" has been filled out to reflect which version the patch will actually appear in.

Generated at Mon Feb 17 08:26:06 CET 2020 using Jira 8.3.4#803005-sha1:1f96e09b3c60279a408a2ae47be3c745f571388b.