From Lua 5.2: Add math.log(x, base).

This commit is contained in:
Mike Pall
2012-10-07 15:47:11 +02:00
parent 0d62e2e1ab
commit 0561a56938
8 changed files with 129 additions and 11 deletions

View File

@@ -1804,7 +1804,16 @@ static void build_subroutines(BuildCtx *ctx)
|.else
| math_extern sqrt
|.endif
| math_extern log
|
|.ffunc math_log
| cmplwi NARGS8:RC, 8
| lwz CARG3, 0(BASE)
| lfd FARG1, 0(BASE)
| bne ->fff_fallback // Need exactly 1 argument.
| checknum CARG3; bge ->fff_fallback
| blex log
| b ->fff_resn
|
| math_extern log10
| math_extern exp
| math_extern sin