+ 4

Datatype Difference

why there difference while storing point values in different data types for example float a=0.7 ; double b=0.7; why a!=b

18th Aug 2017, 4:38 AM
Azam
Azam - avatar
6 Respostas
18th Aug 2017, 4:40 AM
Manual
Manual - avatar
+ 7
Because each number data type has a different range
18th Aug 2017, 4:40 AM
Manual
Manual - avatar
+ 5
@Muhammad From your comment is seems like you ignored the link, I spent time getting for you. If you want the answer, The information is in the link.
18th Aug 2017, 6:35 AM
Manual
Manual - avatar
+ 4
Float vs. Double demo / differences: https://code.sololearn.com/ckZEfBRiUrEA/?ref=app
18th Aug 2017, 4:42 AM
Kirk Schafer
Kirk Schafer - avatar
+ 4
here is simple code to show the difference: https://code.sololearn.com/cAsFU2vjRDe3/?ref=app
18th Aug 2017, 5:25 AM
Highman
Highman - avatar
+ 1
I want behind the reason is. I know these are different. as non floating values are equal either these are store in int or double
18th Aug 2017, 6:23 AM
Azam
Azam - avatar