[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Bitwise XOR in Lua?
- From: Reuben Thomas <rrt@...>
- Date: Tue, 10 Sep 2002 16:11:44 +0100 (BST)
> Well, the actual raw bits in the mantissa aren't "correct", because
> there's a separate sign bit while the mantissa is just magnitude. But
> when you convert the double to an integer (i.e. in a wrapped C
> function), it should come out right.
But you don't convert. At least, I don't. I'm just doing the calculation
with numbers within Lua, and am interpreting them as bit patterns. That
way it works fine.
http://www.mupsych.org/~rrt/ | egrep, n. a bird that debugs bison