floating-point tag

14 questions


1 answers
118 views
0
How to raise the float

We need a float raise function that runs like the code below math.h has ceil() and floor() but not round().Is it in another C++ library or not at all?float round(float);round(0.1) = 0round(-0.1) = 0ro...


1 answers
77 views
0
I want to print out the entire 'double' when I print out the cout

If I run the source code below,It says 3.14159265358979 instead of 3.14159Instead of rounding off the decimal point,What should I do to get the full price?int main(){ double d = 3.14159265358979; cout...


1 answers
137 views
0
Why is there no rounding function (rounding x)?

There is a round() function, but why is there no ceil() function? ㅜ??round(2.3)If you do this, you get 2.0, but I want to get 3. int(number + 0.5)I've tried it, but I'm going crazy because it's also l...


1 answers
101 views
0
Difference between float and double

I read about the difference between float and doubleMost of the time, they seem to produce the same resultsBut when I solve the problem of floating point calculation,When I use my computer, I use 10 c...

« - 2 -

© 2024 OneMinuteCode. All rights reserved.