How can I eliminate this expression as zero?
double dBaseFitness = (double) basophysist; X.shortfitness = (tall) (MathPo (DBsephasit, DBCFestis / 8.0) / 100.0) * (tall) (Math.pu (double) x.genome.GSIZE, -.1) /100.0); x.shortfitness is a long value. X.Genome.GSIZE is an int
The only reason is that I am dividing each expression from 100 so that the result is not greater than the maximum value of a long type.
what is baseFitness an integer? If so, then basefaceet / 8 divides the integer for example 7/8 will be generated 0 . Change your 8 and 100 to 8d and 100d to apply the floating point division.
Comments
Post a Comment