[PyPy-issue] [issue677] dtoa conversion fails on powerpc, 64 bit

Sven Hager pypy-dev-issue at codespeak.net
Thu Mar 24 16:12:10 CET 2011


New submission from Sven Hager <sven.hager at uni-duesseldorf.de>:

There is a bug at converting floats to strings on a PPC machine, 64 bit, which
is due to some endianess flaw in dtoa.c.

E. g. if one tries to execute

>>>> print 3.14

the output is 4.27698109031e+86.
The problem can be solved if one substitutes the line
 
119: #define DOUBLE_IS_LITTLE_ENDIAN_IEEE754

in dtoa.c by 

#define DOUBLE_IS_BIG_ENDIAN_IEEE754
#define WORDS_BIGENDIAN

----------
effort: easy
files: dtoa.c
messages: 2334
nosy: pypy-issue, shager
priority: bug
release: 1.4
status: in-progress
title: dtoa conversion fails on powerpc, 64 bit

_______________________________________________________
PyPy development tracker <pypy-dev-issue at codespeak.net>
<https://codespeak.net/issue/pypy-dev/issue677>
_______________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: dtoa.c
Type: text/x-csrc
Size: 82798 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/pypy-issue/attachments/20110324/bc21be27/attachment.c>


More information about the Pypy-issue mailing list