]> git.pond.sub.org Git - empserver/commitdiff
update: Avoid unnecessary inexactness in total_work()
authorMarkus Armbruster <armbru@pond.sub.org>
Wed, 1 Jun 2016 19:29:55 +0000 (21:29 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 17:59:56 +0000 (19:59 +0200)
Commit 5ba8cab (v4.2.20) replaced milit * 2 / 5.0 by milit * 0.4.  Not
so smart; 0.4 isn't exact.  Go back to milit / 2.5.

Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
src/lib/update/populace.c

index ce9cc6fcabe76369943cac26112913bfe39da421..0f3e2afcb2ce79f39c2fda5ffb07a6dfd041ef4f 100644 (file)
@@ -28,7 +28,7 @@
  *
  *  Known contributors to this file:
  *     Dave Pare, 1986
- *     Markus Armbruster, 2004-2014
+ *     Markus Armbruster, 2004-2016
  */
 
 #include <config.h>
@@ -124,5 +124,5 @@ total_work(int sctwork, int etu, int civil, int milit, int uw, int maxpop)
     if (uw > maxpop)
        uw = maxpop;
 
-    return (civil * sctwork / 100.0 + milit * 0.4 + uw) * etu / 100.0;
+    return (civil * sctwork / 100.0 + milit / 2.5 + uw) * etu / 100.0;
 }