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

Hudson commented on THRIFT-3745:
--------------------------------

FAILURE: Integrated in Thrift-precommit #317 (See 
[https://builds.apache.org/job/Thrift-precommit/317/])
THRIFT-3745 The precision should be 17 for double (voipman: 
[https://github.com/apache/thrift/commit/77b8fb3fedeaf0cf030fd8e6afc7808fca408513])
* lib/php/lib/Thrift/Protocol/TJSONProtocol.php
THRIFT-3745 The precision should be 17 for double (voipman: 
[https://github.com/apache/thrift/commit/afcb57495130315bb016a972d365fe6f2202587e])
* lib/php/test/Test/Thrift/Protocol/TestTJSONProtocol.php


> The precision should be 17 for double
> -------------------------------------
>
>                 Key: THRIFT-3745
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3745
>             Project: Thrift
>          Issue Type: Bug
>          Components: PHP - Library
>    Affects Versions: 0.9.3
>            Reporter: WangYaofu
>            Assignee: WangYaofu
>             Fix For: 0.10.0
>
>
> The precision is lost when converting double to string.
>     E.g:
>     $num= 3.1415926535897931;
>     $this->trans_->write(json_encode($num));    
>     The value will be '3.1415926535898' and some precision lost after format 
> operation.
>     But expected value should be '3.1415926535897931'.
>     Solution:
>     ini_set("precision",17);
>     $this->trans_->write(json_encode($num));



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

Reply via email to