Complete.Org: Mailing Lists: Archives: freeciv-dev: July 2003:
[Freeciv-Dev] Re: Floating point exception
Home

[Freeciv-Dev] Re: Floating point exception

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Subject: [Freeciv-Dev] Re: Floating point exception
From: Lobo Gris <molv@xxxxxxxxxxxxx>
Date: Wed, 23 Jul 2003 22:23:35 -0300
Reply-to: molv@xxxxxxxxxxxxx

 >
 >Strange.  Have you modified the ruleset?
 >

Yes. I was experimenting with build_cost values of 0 and 1, and I'm playing 
with the code. ;-).

Anyway, I solved my problem by adding 0.01 to the divisor:

original:
(attack + vuln * victim_count)

new:
(attack + vuln * victim_count + 0.01)

so there is no alteration of behavior in normal cases, and divisor will never 
be zero.


[Prev in Thread] Current Thread [Next in Thread]