Re: [PATCH 1/2]vbscript: Implemented builtin function CInt(try 2)

2013-04-21 Thread Zhan Jianyu
On Sun, Apr 21, 2013 at 11:05 PM, Vincent Povirk wrote: > The man page for modf claims it produces an exact fractional part: > http://manpages.ubuntu.com/manpages/quantal/en/man3/modf.3.html > > It's possible for modf to do this because the fractional part of a > floating point number cannot requi

Re: [PATCH 1/2]vbscript: Implemented builtin function CInt(try 2)

2013-04-21 Thread Vincent Povirk
The man page for modf claims it produces an exact fractional part: http://manpages.ubuntu.com/manpages/quantal/en/man3/modf.3.html It's possible for modf to do this because the fractional part of a floating point number cannot require more precision than the original value. So I think you've esse

Re: [PATCH 1/2]vbscript: Implemented builtin function CInt(try 2)

2013-04-20 Thread Zhan Jianyu
Hi. Vincent. The hard part of Banker's Rounding function is to determine if the fractional part is *exactly* 0.5. Thus, to use ceil and floor , one way (for the positive case) is adding 0.5 to a double value, then judge whether the floor of result number equals to the ceil of result number. And

Re: [PATCH 1/2]vbscript: Implemented builtin function CInt(try 2)

2013-04-20 Thread Vincent Povirk
Dealing with the bits of a floating point number directly is a bit odd, and it makes it hard to review the code. Is there a reason you don't want to use things like modf, floor, and ceil?

Re: [PATCH 1/2]vbscript: Implemented builtin function CInt(try 2)

2013-04-19 Thread Marvin
Hi, While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check? Full results can be found at http://testbot.winehq.org/JobDetails.pl?Key=25204 Your paranoid android