# HG changeset patch # User Matti Hamalainen # Date 1540837979 -7200 # Node ID abcd21b0182973b2c8101ddb96f0f8c155c06543 # Parent 2656b64c4c0435e5151afb720f84408b80932df7 Use floating point formatting for certain DVA values. diff -r 2656b64c4c04 -r abcd21b01829 mgtool.php --- a/mgtool.php Mon Jun 04 00:03:54 2018 +0300 +++ b/mgtool.php Mon Oct 29 20:32:59 2018 +0200 @@ -140,7 +140,7 @@ if (sscanf($val, "%d/%d", $v1, $v2) == 2 && $v2 != 0 && $v1 != 0) { if ($v1 < $v2) - return "1/".($v2 / $v1); + return sprintf("1/%1.1f", $v2 / $v1); else return sprintf("%1.1f", $v1 / $v2); }