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

Hudson commented on THRIFT-3744:
--------------------------------

SUCCESS: Integrated in Thrift-precommit #316 (See 
[https://builds.apache.org/job/Thrift-precommit/316/])
THRIFT-3744 The precision should be 17 (16 bits need after dot) after (voipman: 
[https://github.com/apache/thrift/commit/5a2b9cd39f6088dc5ccc726e7c0d483c5d7470ee])
* lib/d/src/thrift/protocol/json.d
THRIFT-3744 The precision should be 17 (16 bits need after dot) after (voipman: 
[https://github.com/apache/thrift/commit/d1212889e9e6fbc8cac1eb461a300fc748dbb6b3])
* lib/d/src/thrift/protocol/json.d


> The precision should be 17 (16 bits need after dot) after dot for double type.
> ------------------------------------------------------------------------------
>
>                 Key: THRIFT-3744
>                 URL: https://issues.apache.org/jira/browse/THRIFT-3744
>             Project: Thrift
>          Issue Type: Bug
>          Components: D - 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:
> double PI = 3.1415926535897931;
> string value = format("%.16g", PI);
> The value will be '3.141592653589793' and last 1 is lost after format 
> operation.
> But expected value should be '3.1415926535897931'.
> Solution:
> string value = format("%.17g", PI);



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

Reply via email to