Results 1 to 8 of 8

Thread: log and ln finder, with accuracy determiner included!

  1. #1
    Join Date
    Sep 2006
    Location
    Scripter's Heaven
    Posts
    455
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default log and ln finder, exactly accurate, first of its kind

    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 , 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!

  2. #2
    Join Date
    Sep 2006
    Posts
    161
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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.


    Wow. I've been away quite a while. Real life, yea, way unpredictable. Sorry, y'all, if I've caused any inconvenience.

  3. #3
    Join Date
    Sep 2006
    Location
    Scripter's Heaven
    Posts
    455
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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.

  4. #4
    Join Date
    Sep 2006
    Posts
    161
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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.


    Wow. I've been away quite a while. Real life, yea, way unpredictable. Sorry, y'all, if I've caused any inconvenience.

  5. #5
    Join Date
    Feb 2006
    Location
    Tracy/Davis, California
    Posts
    12,631
    Mentioned
    135 Post(s)
    Quoted
    418 Post(s)

    Default

    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

  6. #6
    Join Date
    Sep 2006
    Location
    Scripter's Heaven
    Posts
    455
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    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.

  7. #7
    Join Date
    Feb 2006
    Posts
    3,044
    Mentioned
    4 Post(s)
    Quoted
    21 Post(s)

    Default

    Quote Originally Posted by lardmaster View Post
    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 ?


  8. #8
    Join Date
    Sep 2006
    Location
    Scripter's Heaven
    Posts
    455
    Mentioned
    0 Post(s)
    Quoted
    0 Post(s)

    Default

    well, at least your confusing messages arent as bad as they are on some IRCs
    (will post soon)

    ok, include it and run

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

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Creating a pick head finder, and gas finder
    By Tom_Gower in forum OSR Help
    Replies: 7
    Last Post: 11-07-2008, 07:06 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •