0
What's floating value
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.
0
a floating point value is basically a number with decimal part, like this:
3.1415
10.0
0.5
etc.