I wrote:

> Dominique Pellé wrote:
> 
> > Attached patch improves coverage tests of function printf().
> 
> Thanks, I'll include it.
> 
> > While adding tests, I noticed a few things possibly wrong:
> > 
> > :echo printf("%f", sqrt(-1.0))
> > -nan
> > 
> > I would have expected it to print "nan" instead of "-nan"
> > as in the example given in :help sqrt().  nan should not
> > be signed. I'm curious what it prints on other systems.
> > 
> > Another bug:  The following 2 commands correctly
> > prints signed infinity:
> > 
> > :echo 1.0/0.0
> > inf
> > :echo -1.0/0.0
> > -inf
> > 
> > But when using printf(), the sign is gone.  The sign
> > is significant for infinity, so the output of printf()
> > looks wrong:
> > 
> > :echo printf('%f', 1.0/0.0)
> > inf
> > :echo printf('%f', -1.0/0.0)
> > inf
> > 
> > I expected instead inf and -inf.
> 
> Perhaps you can fix this.

Never mind.  The test was failing on Windows, because it uses this weird
1.#INF format.  So I fixed this as well.


-- 
>From "know your smileys":
 *<|:-) Santa Claus (Ho Ho Ho)

 /// Bram Moolenaar -- [email protected] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\  an exciting new programming language -- http://www.Zimbu.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui