Jonathan Shan wrote:
> Hello,
>
> I'm experiencing a problem where the float being appended to the array
> is not the same as the result of the appending.
>
from array import *
x = array('f')
x.append(float("0.1"))
x[0]
> 0.1000149011612
float("0.1")
> 0.1
Jonathan Shan wrote:
> Hello,
>
> I'm experiencing a problem where the float being appended to the array
> is not the same as the result of the appending.
>
from array import *
x = array('f')
x.append(float("0.1"))
x[0]
> 0.1000149011612
float("0.1")
> 0.1000
On Aug 17, 2:06 pm, Jonathan Shan <[EMAIL PROTECTED]> wrote:
> Hello,
>
> I'm experiencing a problem where the float being appended to the array
> is not the same as the result of the appending.
>
> >>> from array import *
> >>> x = array('f')
> >>> x.append(float("0.1"))
> >>> x[0]
> 0.1000149
Hello,
I'm experiencing a problem where the float being appended to the array
is not the same as the result of the appending.
>>> from array import *
>>> x = array('f')
>>> x.append(float("0.1"))
>>> x[0]
0.1000149011612
>>> float("0.1")
0.10001
I'm expecting x[0] = 0.100