0

What's floating value

30th Dec 2016, 5:06 AM
Prithviraj
2 Respostas
+ 1
as in a float or floating point number? floats usually refer to a 32bit number. the official document on the subject is IEEE-754. the Wikipedia page is also a good source. of the 32 bits some of them are used to define the significant eg: 12345. some of the bits are used for the exponent eg *10^-4 which makes the number 1.2345 Python has little control over how many bits are being used eg 32bit float vs 64. this can cause problems in some cases. if you want full control over your floats, use numpy. import numpy as np np.float32(1.2345) #or np.float64(1.2345) there are many other dtypes available.
30th Dec 2016, 5:32 AM
last
last - avatar
0
a floating point value is basically a number with decimal part, like this: 3.1415 10.0 0.5 etc.
30th Dec 2016, 5:26 AM
Alejandro Aristizabal
Alejandro Aristizabal - avatar