Open wenchenvincent opened 6 years ago
The values are stored as 32-bit floats internally. They have precision of 24 significant bits meaning they cannot (generally) represent integer values larger then 16777216.
For instance this will fail at the last line
assert np.float32(2 ** 24 - 1) == 2 ** 24 - 1
assert np.float32(2 ** 24 ) == 2 ** 24
assert np.float32(2 ** 24 + 1 ) == 2 ** 24 + 1
Thank you for the answer! Is there any option that we can choose to represent the numbers as double precision?
I am afraid not.
I was trying to create data tables from Python list of list. I found that there was a problem with importing the values correctly for some relatively large numbers. It seemed that there was bug when creating a Continunous Value with relatively large numbers. For example
Orange.data.Value(Orange.feature.Continuous(),308632021)
This construction will give me the following Value: <orange.Value ''='308632032.000'>
It seems that for relatively large numbers, the conversion would usually be wrong but in a way that is not like an overflow.