Forum

> > CS2D > Scripts > The Ultimate Lua Challenge
Forums overviewCS2D overview Scripts overviewLog in to reply

English The Ultimate Lua Challenge

89 replies
Page
To the start Previous 1 2 3 4 5 Next To the start

old Re: The Ultimate Lua Challenge

FlooD
GAME BANNED Off Offline

Quote
user Lee has written
He found a startling discovery
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...
user 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

old Re: The Ultimate Lua Challenge

Flacko
User Off Offline

Quote
user 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)

old Re: The Ultimate Lua Challenge

Lee
Moderator Off Offline

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

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

old Re: The Ultimate Lua Challenge

FlooD
GAME BANNED Off Offline

Quote
but whats your reason lol


lee can i post 44?
Spoiler >

old Re: The Ultimate Lua Challenge

Lee
Moderator Off Offline

Quote
Bisection?

You should work as a janitor at MIT, change your name to Will.
edited 1×, last 25.03.13 11:13:04 pm

old Re: The Ultimate Lua Challenge

Lee
Moderator Off Offline

Quote
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)

• 45 (Easy)

Implement matrix-matrix multiplication in Lua.

old Re: The Ultimate Lua Challenge

FlooD
GAME BANNED Off Offline

Quote
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
To the start Previous 1 2 3 4 5 Next To the start
Log in to reply Scripts overviewCS2D overviewForums overview