[ 
https://issues.apache.org/jira/browse/THRIFT-3433?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15018625#comment-15018625
 ] 

Jens Geyer commented on THRIFT-3433:
------------------------------------

THRIFT-110 holds [the spec for 
compact|https://issues.apache.org/jira/secure/attachment/12398366/compact-proto-spec-2.txt].
 For double it only says:

{code}
double  => (8-byte double)
{code}

I would interpret that as "double like in binary protocol", hence in 
network-byte-order. [In the old wiki there's some more 
information|https://wiki.apache.org/thrift/New_compact_binary_protocol]. If in 
doubt, Java and Ruby are the ones part of the original implementation, so they 
probably represent the current law.

> Doubles aren't interpreted correctly
> ------------------------------------
>
>                 Key: THRIFT-3433
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3433
>             Project: Thrift
>          Issue Type: Bug
>          Components: Haskell - Library
>    Affects Versions: 0.9.3
>            Reporter: Tom Lippincott
>
> When reading in a string-to-double map from the identical file using the 
> Compact protocol, Python gives the correct values:
> ...
> u'roh': -12.012431158160835
> ...
> but Haskell is totally off:
> ...
> ("roh",6.355136015066463e-157)
> ...
> The funny thing is, if I read it into Haskell (and the numbers are all off), 
> then write it out to another file, that file still has correct numbers when 
> loaded into Python.  So it seems that the raw information is being 
> (de)serialized correctly at the bit-level, but Haskell isn't interpreting it 
> as a double the same way as Python...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to