Results 1 to 2 of 2

Thread: Log of numbers

  1. #1

    Thread Starter
    Fanatic Member Wynd's Avatar
    Join Date
    Dec 2000
    In a bar frequented by colossal death robots

    Log of numbers

    Ok, a friend and I are trying to make a math class in javascript. We are trying to not have any dependency on the original math class so we are trying to write all our own functions for exponents, roots, etc. How do you calculate the log of a number? Is there a specific formula or something?
    Alcohol & calculus don't mix.
    Never drink & derive.

  2. #2
    Frenzied Member
    Join Date
    Mar 2000
    use the sequence to evaluate ln(x/(2^n)), although it's an invinite series it converges pretty quickly so you only need to do the first 10-20 terms.

    I would warn you that doing it this way will be pretty slow, the series I've given you is actually hard wired into the FPU, doing it in Java Script will be chronic compared to the original one
    Attached Images Attached Images  
    If it wasn't for this sentence I wouldn't have a signature at all.

Posting Permissions

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

Click Here to Expand Forum to Full Width