[Date Prev][Date Next][Thread Prev][Thread Next]
- Subject: Re: exponent and modulus operator oddities on ppc
- From: Ralph Hempel <rhempel@...>
- Date: Mon, 02 Mar 2009 14:27:05 -0500
Mike Pall wrote:
As to why you're seeing differences between script and interactive
execution: Lua folds constants while parsing and this indirectly
calls pow() for the ^ operator. A script is parsed in one go, but
the interactive prompt runs the parser for every line.
Calling floor() on behalf of the % operator apparently screws up
the FPU state. The non-constant folded ^ operator is thus always
affected, but the constant-folded one is only affected if the
parsing is done afterwards.
There's almost always someone here with the right combination of
expertise and the ability to explain the possible sources of the
And I learned something about the parser and the prompt too.