can u try this rounding method with 0.3 + 0.1 ? it does not work with me but it does work with 0.1 + 0.2 i don't think this rounding technique solve the problem 🙃
@@plasma8321 well i used c++ and i have used a rounding function called std::round() I'm sure it works like the one u used in the video and guess what 0.4 will always gives 0.40000000000000002
@@justcurious1940 This is weird. C++ seems to round both functions automatically without even needing to do anything. Im not sure how your getting this
Are you using python?
No. This is written in java. But the idea is the same
can u try this rounding method with 0.3 + 0.1 ? it does not work with me but it does work with 0.1 + 0.2
i don't think this rounding technique solve the problem 🙃
sorry maybe i did not get the video are u rounding the stored value or just the output ?
@@justcurious1940 the output is rounded
@@plasma8321 well i used c++ and i have used a rounding function called std::round() I'm sure it works like the one u used in the video and guess what
0.4 will always gives 0.40000000000000002
@@justcurious1940 This is weird. C++ seems to round both functions automatically without even needing to do anything. Im not sure how your getting this
@@plasma8321 std::cout.precision(17) ;
std::cout
u sound so bored and not interested at all is java the reason ?
No! I was reading a script
@@plasma8321 its funny i'm using c++ and when i do something like this :
double x = 0.3 ;
std::cout