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

Zhan Jianyu nasa4836 at gmail.com
Sun Apr 21 00:45:24 CDT 2013


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
equaty comparison could not avoid incurring
inaccuracy, which is not what I want .Dealing with the bit pattern may
looks odd, but it is correct.
--

Regards,
Zhan Jianyu

Sent from cell phone.
在 2013-4-21 上午1:30,"Vincent Povirk" <madewokherd at gmail.com>写道:

> 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?
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.winehq.org/pipermail/wine-devel/attachments/20130421/29fa2a2e/attachment.html>


More information about the wine-devel mailing list