Bill McCarthy wrote:
>     echo printf( "%0.12f\n", &0.999999999999 )

Yesterday I mentioned on the list that the current Vim code will do what you
observed. I used the more modest value of 0.3111222333 to illustrate the issue.

The current Vim code evaluates the integer and fractional components as separate
integers. On a 32-bit machine, you only need 9 or 10 digits to overflow.

A few hours ago I added that I think the standard C library routine strtod() 
should
be used to avoid these kind of issues (with the defect that some systems won't 
have
a functioning strtod()).

John


--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui