বভনন চকরর পরকষয় কব একডমক পরকষর এই ধরনর পরশন কর হয় থক অনক এই কনসপটট ভল কর ন বঝর করন সঠকভব উততর লখত পরন To clear the concept of comparison of two floating point number or double or int and float then how to calculate the result by the compiler I just tried to clear the concept how much i know.
দশমক সখযর সথ ইনটজর অথব দশমক ফলট সখযর সথ দশমক ডবল নমবর কভব সস কমপইলর তলন কর সট সহজ বঝনর জনয আমর এই ছট পরচষট ছট খট ভল গল কষম সনদর দষটত দখবন ভডওট ভল লগল লইক শয়র দবন তহল পরর টউটরয়লগল দত উৎসহত হব
Just to be clear this post is not going to be about the float vs.
float comparison.
Instead it will be about trying to compare a floating point value with an integer value in an accurate precise way.
It will also be about why just doing int_value float_value in some languages C C PHP and some other doesnt give you the result you would expect - a problem which I recently stumbled on when trying to fix a certain library I was using.
in case of float 1.1 is not stored in a.What is actually stored in a is slightly less than 1.
1 1.099999988 appx and in case of double 1.099999999and in case of long double exactly 1.1 gets stored.
because float double long double take 4 8 10 respectivelyso the else part is get executed.
But when the we are giving the values like 3.0.
No fractional part.So if part gets executed.
Comparison of a float with a value in C
Comparing Floating Point Numbers in CC Bangla tutorial
c Programming tutorial
programming tutorial
c programming bangla
floating point issues in c and c
finding output program
find the output of the program?
c program output?
comparison of float and int in c
comparison of float and double in c
Источник: rutube.ru