# \[Ruby 1.9 - Bug #6\] sprintf() of %f on Windows(MSVCRT)

**URL:** <https://www.ruby-forum.com/t/ruby-1-9-bug-6-sprintf-of-f-on-windows-msvcrt/143284>\
**Category:** Development\
**Created:** [July 16, 2008, 11:58pm UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-6-sprintf-of-f-on-windows-msvcrt/143284 "2008-07-16T23:58:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Usaku\_NAKAMURA](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/u/cc9497/32.png) [@Usaku\_NAKAMURA](https://www.ruby-forum.com/u/Usaku_NAKAMURA)\
**Post date:** [July 16, 2008, 11:58pm UTC](https://www.ruby-forum.com/t/ruby-1-9-bug-6-sprintf-of-f-on-windows-msvcrt/143284/1 "2008-07-16T23:58:56Z")

</div>

e$B%A%1%C%He(B #6 e$B$,99?7$5$l$^$7$?!#e(B (by Usaku NAKAMURA)

e$BK:$l$J$$$h$&$K4X78$,$"$k$H;W$o$l$kLdBj$rDI2C$7$F$\*$-$^$9!#e(B

test\_attr(Complex\_Test) [(snip)/test/ruby/test\_complex.rb:186]:  
\<“-0.0”\> expected but was  
\<“0.0”\>.

test\_fixed\_bug(Complex\_Test) [(snip)/test/ruby/test\_complex.rb:1114]:  
\<“-1.0-0.0i”\> expected but was  
\<“-1.0+0.0i”\>.

test\_to\_s(TestFloat) [(snip)/test/ruby/test\_float.rb:126]:  
\<“1.0e+14”\> expected but was  
\<“1.0e+014”\>.

test\_format\_float(TestSprintfComb)  
[(snip)/test/ruby/test\_sprintf\_comb.rb:539:in `block (2levels) in test_format_float' (snip...) (snip)/test/ruby/test_sprintf_comb.rb:526:in `test\_format\_float’]:  
sprintf(“%e”, -123456789).  
\<“-1.234568e+08”\> expected but was  
\<“-1.234568e+008”\>.

* * *

[http://redmine.ruby-lang.org/issues/show/6](http://redmine.ruby-lang.org/issues/show/6)
