summaryrefslogtreecommitdiff
path: root/nlpsolver
diff options
context:
space:
mode:
authorLaurent Balland-Poirier <laurent.balland-poirier@laposte.net>2016-11-30 21:50:06 +0100
committerChristian Lohmaier <lohmaier+LibreOffice@googlemail.com>2016-12-22 14:19:46 +0000
commitd9ff86c9cf90925d0344b9572c651301847ca78c (patch)
treee01adb6ac76c9d2ca5ebd47d5c57ee4782abbd18 /nlpsolver
parente95e05795d192275fa3c44a87377ce8353ae32d8 (diff)
tdf#104268 NLPSolver: Improve display of solution
Format "%.2f" is not optimal for large or small values. Format "%g" should be prefered. Change-Id: I92899d80564b9000b1f3e049221c456f8e1176a9 Reviewed-on: https://gerrit.libreoffice.org/31445 Tested-by: Jenkins <ci@libreoffice.org> Reviewed-by: Noel Grandin <noel.grandin@collabora.co.uk> Tested-by: Noel Grandin <noel.grandin@collabora.co.uk> (cherry picked from commit 0412d863d144344b4c6c04b22209c0c57f1d6fb8) Reviewed-on: https://gerrit.libreoffice.org/31939 Reviewed-by: Christian Lohmaier <lohmaier+LibreOffice@googlemail.com>
Diffstat (limited to 'nlpsolver')
-rw-r--r--nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java2
1 files changed, 1 insertions, 1 deletions
diff --git a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
index da8dbb22e997..e3695a0c7950 100644
--- a/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
+++ b/nlpsolver/src/com/sun/star/comp/Calc/NLPSolver/dialogs/EvolutionarySolverStatusUno.java
@@ -177,7 +177,7 @@ public class EvolutionarySolverStatusUno extends BaseDialog
}
public void setBestSolution(double solution, boolean feasible) {
- lblSolutionValue.setLabel(String.format("%.2f", solution));
+ lblSolutionValue.setLabel(String.format("%g", solution));
if (feasible)
lblSolutionValue.setTextColor(defaultTextColor);
else