Code:
#include <iostream>
#include <iomanip>
int main()
{
using namespace std;
int expected [] = {604,604,604,605,606,606,606,607,608,608,608,609,610,610,610,611,612,612,612,613,614,614,614,615,616,616,616,617,618,618,618,619,620,620,620,621,622,622,622,623,624,624,624,625,626,626,626,627,628,628,628,629,630,630,630,631,632,632,632,633,634,634,634,635,636,636,636,637,638,638,638,639,640,640,640,641,642,642,642,643,644,644,644,645,646,646,646,647,648,648,648,649,650,650,650,651,652,652,652,653,654,654,654,655,656,656,656,657,658,658,658,659,660,660,660,661,662,662,662,663,664,664,664,665,666,666,666,667,668,668,668,669,670,670,670,671,672,672,672,673,674,674,674,675,676,676,676,677,678,678,678,679,680,680,680,681,682,682,682,683,684,684,684,685,686,686,686,687,688,688,688,689,690,690,690,691,692,692,692,693,694,694,694,695,696,696,696,697,698,698,698,699,700,700,700,701,702,702,702,703,704,704,704,705,706,706,706,707,708,708,708,709,710,710,710,711,712,712,712,713,714,714,714,715,716,716,716,717,718,718,718,719,720,720,720,721,722,722,722,723,724,724,724,725,726,726 };
for(int i=7;i<252;i++) {
float mana = (i/2.0)+600;
cout << setprecision(3) << "For INT = " << i << ", Mana is " << mana << ", Expected value is " << expected[(i-7)] << ", Actual value is " << setprecision(4) << mana << endl;
}
}
and an image of the first 31 outputs where Mana is the calculated result, Expected is your data, and Actual is the same calculated result without limiting the precision.
Bookmarks