PDA

View Full Version : log and ln finder, with accuracy determiner included!



lardmaster
10-08-2006, 11:39 PM
here, complete revamp again, with newton's algorithm www.google.com google me! it is very accurate and quick now, and plz add this to math.scar !!!

ps, rep++ plz and add this to srl core/math.scar plz admins!, it is necessary for a gaussian mouse function which im writing.

EDIT:fine you 29 people, dont leave comments :mad: , i updated it, 1000 calculations in 2 seconds on my slow computer(too slow for srl scripts) with the maximum accuracy allowed for an extended! PLZ COMMENTS?ADD TO MATH.SCAR!

I Pick Axes
10-16-2006, 02:04 AM
Newton's algorithm is like Bubble Sort. It's something they teach you in computer science classes to illustrate a concept, yet has no true use in reality. Both are exceedingly slow for even somewhat large inputs. Newton's algorithm is a great example of simple recursion, but its recursive nature gives you a bad running time.

lardmaster
10-16-2006, 06:49 PM
hmm... not quite true in this case. by using findclose, it is within one when the algorithm starts. thus, it gets 17 decimal places in 7 iterations, for a total running time of 2 ms per calculation. i think that is fast enough for any script, and certainly not slow at all. yes, there are faster algorithms, but they are more complicated, and who wants to spend the time writing them out, to save at maximum 2 milliseconds? i dont consider 2 thousands of a second exeedingly slow.

ps. it was 2 seconds for 1000 calculations on my computer, [the computer] is very slow by today's standards. try running it on yours.

I Pick Axes
10-16-2006, 09:53 PM
I don't want to continue saying things against you for now. There's always a chance I might be the one wrong when I say this sort of stuff.

YoHoJo
10-16-2006, 10:06 PM
uhh im still unclear at wtf this is supposed to do
its also enexpected end of file
can you make a scripting using the procedures and functinons in this so i know how to work it =p

lardmaster
10-16-2006, 11:33 PM
ok, i will, on a different computer though, basicly, you call setupln(); to set it up, then ln(whatever) or log(whatever,base), as you would on a normal calculator.

home: its ok, i went a little over the top, but i think it will serve its purpose.

Home
10-16-2006, 11:41 PM
ok, i will, on a different computer though, basicly, you call setupln(); to set it up, then ln(whatever) or log(whatever,base), as you would on a normal calculator.

home: its ok, i went a little over the top, but i think it will serve its purpose.

Talking to me :)?

:D

lardmaster
10-18-2006, 01:22 AM
well, at least your confusing messages arent as bad as they are on some IRCs
(will post soon)

ok, include it and run


{.incude logln.scar}
begin
writeln(inttostr(ln(readln('what do you want to find the log base e of?')));
end.