*sigh* this has to be super simple, but I think my brain if getting fried from coding today.
I have an int and a double...i know the double is actually an integer value (in this case, but I cannot change the double declaration to int). All I wanna do is subtract the int values of both vars, and its being silly:
Code:
printf("[Clauses] %d - [obj best] %17.10e = [fitness] %d \n", sat_clauses, objective_best, sat_clauses-objective_best);
printf("[Clauses] %d - [obj best] %17.10e = [fitness] %d \n", sat_clauses, (int)objective_best, sat_clauses-(int)objective_best);
Output:
[Clauses] 298 - [obj best] 2.9700000000e+02 = [fitness] 0
[Clauses] 298 - [obj best] 2.1219959377e-314 = [fitness] 0
While the result i'm looking for is
[Clauses] 298 - [obj best] 297 = [fitness] 1
Don't yell, I know its something stupid