Bug#882367: Included help for function expression entry contains an error

2017-11-21 Thread Mirko Scholz
Package: qtiplot
Version: 0.9.8.9-16 

QtiPlot contains documentation for the available functions within the muparser 
package.
It appears when a column value is set (column header context menu "Set column 
values"
and choosing the log function from the drop down menu).

However, the documentation for the log function is wrong.  At least current 
versions
of muparser [1] specify it as the natural logarithm, not the decimal logarithm.

I tested the expression log(10) with Buster's version of muparser and it 
evaluates
to log_e(10)\approx2.3, not log_{10}(10.0)=1.0.

I tried to modify all translations accordingly.

[1] 
http://beltoforion.de/article.php?a=muparser=en=features=idDef2#idDef2
Only in qtiplot-0.9.8.9-working: debian
diff -r -u qtiplot-0.9.8.9/qtiplot/src/scripting/muParserScripting.cpp 
qtiplot-0.9.8.9-working/qtiplot/src/scripting/muParserScripting.cpp
--- qtiplot-0.9.8.9/qtiplot/src/scripting/muParserScripting.cpp 2012-11-07 
17:11:32.0 +0100
+++ qtiplot-0.9.8.9-working/qtiplot/src/scripting/muParserScripting.cpp 
2017-11-21 20:19:03.616750339 +0100
@@ -80,7 +80,7 @@
   { "invf", 3, NULL, NULL, invf, QObject::tr("invf(x, m, n):\n Inverse 
F-Distribution with m and n degrees of freedom.") },
   { "invt", 2, NULL, invt, NULL, QObject::tr("invt(x, n):\n Inverse 
t-distribution with n degrees of freedom.") },
   { "ln", 1, NULL,NULL,NULL, QObject::tr("ln(x):\n Calculate natural logarithm 
log_e.") },
-  { "log", 1, NULL,NULL,NULL, QObject::tr("log(x):\n Calculate decimal 
logarithm log_10.") },
+  { "log", 1, NULL,NULL,NULL, QObject::tr("log(x):\n Calculate natural 
logarithm log_e.") },
   { "log10", 1, NULL,NULL,NULL, QObject::tr("log10(x):\n Calculate decimal 
logarithm log_10.") },
   { "log2", 1, NULL,NULL,NULL, QObject::tr("log2(x):\n Calculate binary 
logarithm log_2.") },
   { "min", -1, NULL,NULL,NULL, QObject::tr("min(x,y,...):\n Calculate minimum 
of all arguments.") },
Only in qtiplot-0.9.8.9-working/qtiplot/src: TAGS
diff -r -u qtiplot-0.9.8.9/qtiplot/translations/qtiplot_cn.ts 
qtiplot-0.9.8.9-working/qtiplot/translations/qtiplot_cn.ts
--- qtiplot-0.9.8.9/qtiplot/translations/qtiplot_cn.ts  2012-11-07 
17:11:32.0 +0100
+++ qtiplot-0.9.8.9-working/qtiplot/translations/qtiplot_cn.ts  2017-11-21 
20:59:20.073507619 +0100
@@ -21502,9 +21502,9 @@
 
 
 log(x):
- Calculate decimal logarithm log_10.
+ Calculate natural logarithm log_e.
 log(x):
- 计算以10为底的对数。
+ 计算自然对数(以e为底的对数)。
 
 
 
diff -r -u qtiplot-0.9.8.9/qtiplot/translations/qtiplot_cz.ts 
qtiplot-0.9.8.9-working/qtiplot/translations/qtiplot_cz.ts
--- qtiplot-0.9.8.9/qtiplot/translations/qtiplot_cz.ts  2012-11-07 
17:11:32.0 +0100
+++ qtiplot-0.9.8.9-working/qtiplot/translations/qtiplot_cz.ts  2017-11-21 
21:01:00.890178064 +0100
@@ -13069,9 +13069,9 @@
 
 
 log(x):
- Calculate decimal logarithm log_10.
+ Calculate natural logarithm log_e.
 log(x):
- Počítá desetinný logaritmus log_10.
+ Počítá přirozený logaritmus log_e
 
 
 exp(x):
diff -r -u qtiplot-0.9.8.9/qtiplot/translations/qtiplot_de.ts 
qtiplot-0.9.8.9-working/qtiplot/translations/qtiplot_de.ts
--- qtiplot-0.9.8.9/qtiplot/translations/qtiplot_de.ts  2012-11-07 
17:11:32.0 +0100
+++ qtiplot-0.9.8.9-working/qtiplot/translations/qtiplot_de.ts  2017-11-21 
21:04:07.666851735 +0100
@@ -22246,9 +22246,9 @@
 
 
 log(x):
- Calculate decimal logarithm log_10.
+ Calculate natural logarithm log_e.
 log(x):
- Zehnerlogarithmus log_10.
+ Natürlicher Logarithmus log_e.
 
 
 log10(x):
diff -r -u qtiplot-0.9.8.9/qtiplot/translations/qtiplot_el.ts 
qtiplot-0.9.8.9-working/qtiplot/translations/qtiplot_el.ts
--- qtiplot-0.9.8.9/qtiplot/translations/qtiplot_el.ts  2012-11-07 
17:11:32.0 +0100
+++ qtiplot-0.9.8.9-working/qtiplot/translations/qtiplot_el.ts  2017-11-21 
21:04:44.620186454 +0100
@@ -12944,9 +12944,9 @@
 
 
 log(x):
- Calculate decimal logarithm log_10.
+ Calculate natural logarithm log_e.
 log(x):
-Υπολογισμός δεκαδικού λογάριθμου log_10.
+Υπολογισμός φυσικού λογάριθμου log_e.
 
 
 log10(x):
diff -r -u qtiplot-0.9.8.9/qtiplot/translations/qtiplot_es.ts 
qtiplot-0.9.8.9-working/qtiplot/translations/qtiplot_es.ts
--- qtiplot-0.9.8.9/qtiplot/translations/qtiplot_es.ts  2012-11-07 
17:11:32.0 +0100
+++ qtiplot-0.9.8.9-working/qtiplot/translations/qtiplot_es.ts  2017-11-21 
21:05:03.360187157 +0100
@@ -18852,7 +18852,7 @@
 
 
 log(x):
- Calculate decimal logarithm log_10.
+ Calculate natural logarithm log_e.
 
 
 
diff -r -u qtiplot-0.9.8.9/qtiplot/translations/qtiplot_fr.ts 
qtiplot-0.9.8.9-working/qtiplot/translations/qtiplot_fr.ts
--- qtiplot-0.9.8.9/qtiplot/translations/qtiplot_fr.ts  2012-11-07 
17:11:32.0 +0100
+++ qtiplot-0.9.8.9-working/qtiplot/translations/qtiplot_fr.ts  2017-11-21 
21:13:00.356871712 +0100
@@ -13219,9 +13219,9 @@
  

Bug#805534: Potential stack overflow in Correlation.cpp

2015-11-19 Thread Mirko Scholz
Package: qtiplot
Version: 0.9.8.9-10

On systems that limit the stack space per user, the current implementation of
correlation causes a stack overflow for large tables, say 1e6 rows.  Otherwise
this amount of rows is handled well by Qtiplot.

The attached patch solves the problem, albeit you may want to implement
it differently.

Upstream (www.qtiplot.com) does not accept patches anymore

--- qtiplot-0.9.8.9/qtiplot/src/analysis/Correlation.cpp2015-11-04 
11:36:44.139928471 +0100
+++ qtiplot-0.9.8.9/qtiplot/src/analysis/Correlation.cpp2015-11-04 
11:44:03.501165132 +0100
@@ -150,21 +150,22 @@
 
 if (d_n > d_table->numRows())
 d_table->setNumRows(d_n);
 
int cols = d_table->numCols();
int cols2 = cols+1;
d_table->addCol();
d_table->addCol();
int n = d_n/2;
 
-double x_temp[d_n], y_temp[d_n];
+   double *x_temp = new double[d_n];
+   double *y_temp = new double[d_n];
for (int i = 0; icolName(cols), 
d_table->colName(cols2));
c->setData(x_temp, y_temp, d_n);
c->setPen(QPen(d_curveColor, 1));
d_output_graph->insertPlotItem(c, Graph::Line);
d_output_graph->updatePlot();
}
+   delete[] x_temp;
+   delete[] y_temp;
 }


signature.asc
Description: Digital signature