[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: Next Version of Lua?
- From: Olivier Hamel <evilpineapple@...>
- Date: Wed, 10 Jun 2009 12:16:26 -0400
Roberto Ierusalimschy wrote:
Oh. Well. Yah, you won't be getting very far with bitwise ops on float,
I suggest that floats be cast to ints (or whatever) and then the ops
performed on them. It's common knowledge you won't be getting bitwise
ops on floats natively/naturally unless you add some (a lot) of magic
powder to the mix with a slice of lemon. But even there, I don't thing
the idea of bitwise ops can ever EVER apply to floats, since their
internal representation does not match that of a 'simpler' number like
char/short/int/etc... That said, I had in mind to use bitwise ops on
whole numbers anyways...
Roberto said they (inner Lua dev group) weren't happy with any known
implementation of bitwise operators, it would be helpful to know what
they are not pleased with so we may propose alternate
My dream was bitwise operators that make sense for floating numbers,
like shifts and negation do. But I gave up.
Have we considered adding fixed point precision numbers?