You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Jeff Whiting (JIRA)" <ji...@apache.org> on 2009/12/09 17:59:18 UTC

[jira] Updated: (THRIFT-644) Doubles are not IEEE 754 when writing in the BinaryFormat

     [ https://issues.apache.org/jira/browse/THRIFT-644?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jeff Whiting updated THRIFT-644:
--------------------------------

    Attachment: Timing.thrift

The thrift file we are using

> Doubles are not IEEE 754 when writing in the BinaryFormat
> ---------------------------------------------------------
>
>                 Key: THRIFT-644
>                 URL: https://issues.apache.org/jira/browse/THRIFT-644
>             Project: Thrift
>          Issue Type: Bug
>          Components: Compiler (PHP)
>    Affects Versions: 0.1, 0.2, 0.3
>         Environment: PHP 5.3 - Ubuntu 9.10
> Most likely all OSes 
>            Reporter: Jeff Whiting
>         Attachments: Timing.thrift
>
>
> Steps to Repro:
> 1.  Without the PHP thrift extension serialize a struct with a double (note I haven't tested this with the php extension)
> 2. Attempt to read the struct using Java
> Results:
> Java is unable to read the double correctly
> Expected Results:
> Looking at the PHP code in TBinaryProtocol.php the function writeDouble does the following:
> $data = pack('d', $value); 
> According to the PHP documentation (http://php.net/manual/en/function.pack.php)
> 'd' is: double (machine dependent size and representation).
> The double should be IEEE 754 compliant.  

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.