[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: 5.2 work2 documentation for math.pow
- From: "Liam Devine" <liamdevine@...>
- Date: Wed, 23 Apr 2014 14:57:24 +0100
The work documentation for math.pow still states [1]:
"Returns xy. (You can also use the expression x^y to compute this value.) "
This is not always true and depends on the operands:
lua53 -e"print(math.pow(2,-1))"
0.5
lua53 -e"print(2.^-1)"
0.5
lua53 -e"print(2^-1)"
lua53: (command line):1: integer exponentiation with negative exponent
stack traceback:
(command line):1: in main chunk
[C]: in ?
[1] http://www.lua.org/work/doc/manual.html#pdf-math.pow
--
Liam
Attachment:
signature.asc
Description: OpenPGP digital signature