[NumPy-Tickets] [NumPy] #2023: float128 does not convert correctly from strings
NumPy Trac
numpy-tickets@scipy....
Wed Jan 18 12:59:38 CST 2012
#2023: float128 does not convert correctly from strings
----------------------+-----------------------------------------------------
Reporter: parejkoj | Owner: somebody
Type: defect | Status: new
Priority: high | Milestone: Unscheduled
Component: Other | Version: 1.6.1
Keywords: |
----------------------+-----------------------------------------------------
Converting strings to float128/dtype('f16') does not produce the desired
precision, but rather converts to float64 first. I'm using OS X 10.6.8,
numpy 1.6.1, python 2.6.7, compiled under Fink.
Example:
{{{
a=np.float128('0.12345678901234567890')
b=np.float64('0.12345678901234567890')
repr(a)
repr(b)
a==b
}}}
produces:
{{{
'0.12345678901234567737'
'0.12345678901234568'
True
}}}
When it should produce:
{{{
'0.12345678901234567890'
'0.12345678901234568'
False
}}}
I couldn't find another bug report about this, but this email thread
describes the same problem:
http://comments.gmane.org/gmane.comp.python.numeric.general/46380
Whereas this bug report from two years ago seems to show correct behavior:
http://projects.scipy.org/numpy/ticket/1311
--
Ticket URL: <http://projects.scipy.org/numpy/ticket/2023>
NumPy <http://projects.scipy.org/numpy>
My example project
More information about the NumPy-Tickets
mailing list