Answers for "float vs integer c++"

C++
1

compare float values c++

bool cmpf(float A, float B, float epsilon = 0.005f)
{ 
    return (fabs(A - B) < epsilon);
}
Posted by: Guest on May-19-2021
1

float in c++

float contains less storage than a double. 
float p = 25.0;
double p = 25.0;
Posted by: Guest on July-06-2020

Browse Popular Code Answers by Language