Well, this is the real Heisenbug . I tried to reduce the code to a minimal duplicate example and got this ( http://ideone.com/mFgs0S ):
#include <iostream>
#include <math.h>
using namespace std;
int main()
{
float n;
cin >> n;
n = 2.98;
cout << "";
float x = n * 50;
float y = ceilf(x);
cout << "";
float z = ceilf(x);
cout << "x:" << x << " y:" << y << " z:" << z << endl;
}
ceilf, -, iostream, . , , , , - , . , , gcc-4.9.2 gcc-5.1. ( ideone, gcc-4.3.2.)