This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: sprintf bugs with floating point and field specifiers?


On 06 September 2006 00:10, Matt Lee wrote:

> I am seeing some bugs with Newlib sprintf and floating point format
> specifiers. Specifically, the following bits of code work incorrectly,

> Output On Xilinx PowerPC 405 platform,
> 
> +00
> 0000
> +000
> 
> while on desktop Linux I get,
> 
> +00.0
> 00000
> +0000

  On current cygwin, I get

dk@rainbow /artimi/software> ./foo.exe
+00.0
00000
+0000
dk@rainbow /artimi/software>

> I have tried both Newlib 1.9.0 and 1.14.0 and see the same behavior. I
> am running a powerpc-eabi toolchain with Newlib configured for
> floating point support.
> 
> I found a few email trails, that seem to discuss related issues but
> were not really the same things? I will try to debug _dtoa_r() and
> cvt(), but wanted to know if this is known behavior.

  Well, we do know that bugs crop up in the dtoa stuff every now and again on
odd corner cases.  Can you reproduce this if you build newlib from the current
CVS HEAD?


    cheers,
      DaveK
-- 
Can't think of a witty .sigline today....


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]