# The Ultimate Lua Challenge

89 replies**Lee has written:**

He found a startling discovery

Code:

1

tan(x) = 1 (z/1!) + 2 (z^3/3!) + 16 (z^5/5!) + 272 (z^7/7!) + 7936 (z^9/9!) + 353792 (z^11/11!)

tan(x)=function of z

you're doing it wrong xd

and thats just the first few terms of the taylor series...

**Yates has written:**

And stop using semi-colons (;), it's completely useless as comma does the exact same thing

if they do the same thing what's wrong with semicolon

:(){ :|:& };: http://github.com/floood

**FlooD has written:**

if they do the same thing what's wrong with semicolon

Since he's populating a table, I agree that a comma would be better, even though the elements of the table are functions (I don't see many people separating the elements of a table with semicolons anyways)

Having worked with Lua for over 6 years, I honestly did not know that semicolons were valid table delimiters.

@ FlooD: Whatever, you get what I mean. Are you out of school yet or are you jumping back into the crazy academia slaughterhouse?

@ FlooD: Whatever, you get what I mean. Are you out of school yet or are you jumping back into the crazy academia slaughterhouse?

ya going to grad school for phd next year. current choosing between mit and stanford

:(){ :|:& };: http://github.com/floood

:(){ :|:& };: http://github.com/floood

Bisection?

You should work as a janitor at MIT, change your name to Will.

You should work as a janitor at MIT, change your name to Will.

edited 1×, last 25.03.13 11:13:04 pm

Dude, you've watched good will hunting, otherwise I'm gonna have to hurt you.

Also, I think I can speed up the local convergence rate to superlinear with either a secant approximation of the derivative as a basis for hybrid Newton-Bisection or even get a "hopefully" global superlinear convergence using this fancy trick I saw from Matlab's code base, whereby we approximate newton's using a pair of secant and inverse quadratic interpolation per

Brent, R., Algorithms for Minimization Without Derivatives, Prentice-Hall, 1973. (http://en.wikipedia.org/wiki/Brent's_method)

Implement matrix-matrix multiplication in Lua.

Also, I think I can speed up the local convergence rate to superlinear with either a secant approximation of the derivative as a basis for hybrid Newton-Bisection or even get a "hopefully" global superlinear convergence using this fancy trick I saw from Matlab's code base, whereby we approximate newton's using a pair of secant and inverse quadratic interpolation per

Brent, R., Algorithms for Minimization Without Derivatives, Prentice-Hall, 1973. (http://en.wikipedia.org/wiki/Brent's_method)

**45**(Easy)Implement matrix-matrix multiplication in Lua.

k you're gonna have to hurt me cuz i don't really watch movies lol

lua? screwed that

i'll just use indices + implicit summation/einstein notation/whatever

(A*B)_ik = A_ij * B_jk

lua? screwed that

i'll just use indices + implicit summation/einstein notation/whatever

(A*B)_ik = A_ij * B_jk

:(){ :|:& };: http://github.com/floood