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


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.

Reply via email to