You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@axis.apache.org by "Samisa Abeysinghe (JIRA)" <ax...@ws.apache.org> on 2004/12/13 03:34:28 UTC
[jira] Resolved: (AXISCPP-320) float number, 77.99 becomes 77.989998 in output string
[ http://nagoya.apache.org/jira/browse/AXISCPP-320?page=history ]
Samisa Abeysinghe resolved AXISCPP-320:
---------------------------------------
Resolution: Fixed
Fix Version: current (nightly)
changed:
AxisSprintf (m_Buf, BTS_BUFFSIZE, "%f", *((float*)(pValue)));
to
AxisSprintf (m_Buf, BTS_BUFFSIZE, "%g", *((float*)(pValue)));
According to the man page of sprintf %f causes the argument to be
"rounded and converted", %g does not.
> float number, 77.99 becomes 77.989998 in output string
> ------------------------------------------------------
>
> Key: AXISCPP-320
> URL: http://nagoya.apache.org/jira/browse/AXISCPP-320
> Project: Axis-C++
> Type: Bug
> Components: Serialization/Deserialization
> Versions: 1.4 Final
> Environment: All platforms
> Reporter: Samisa Abeysinghe
> Assignee: Samisa Abeysinghe
> Fix For: current (nightly)
>
> Jean .A - Canada ->
> Well, I have a strange behavior with floating number and date time format.
> 1 ) With float number, 77.99 becomes 77.989998 output string under
> Axis. Why I lost some digits ??????!!!
> See http://marc.theaimsgroup.com/?t=110260619200001&r=1&w=2 for more details.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://nagoya.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
http://www.atlassian.com/software/jira