Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 3 of 3
  1. #1
    New to the CF scene
    Join Date
    Jun 2008
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Calculus: Integrating with Javascript

    I'm writing a script for a mathematics statistics class that will show students how the normal distribution works (using z tables). In order to get the script to work I either need to code the z tables manually (big pain) or find some javascript tool that will integrate a function (by integration, I mean the integration one does in calculus).

    Does anyone know if Javascript can do integration? If so could you point me in the right direction.

    Thanks!
    Stephanie

  • #2
    Supreme Master coder! Philip M's Avatar
    Join Date
    Jun 2002
    Location
    London, England
    Posts
    18,142
    Thanks
    203
    Thanked 2,547 Times in 2,525 Posts
    I suggest you Google for Math object, e.g.

    http://javascript.about.com/library/blmath.htm

    which give full details of the Javascript Math object and Math methods.

    I suspect that Javascript is not able to do calculus or integration, though.

  • Users who have thanked Philip M for this post:

    oesxyl (06-11-2008)

  • #3
    Master Coder
    Join Date
    Dec 2007
    Posts
    6,682
    Thanks
    436
    Thanked 890 Times in 879 Posts
    Quote Originally Posted by britchick View Post
    I'm writing a script for a mathematics statistics class that will show students how the normal distribution works (using z tables). In order to get the script to work I either need to code the z tables manually (big pain) or find some javascript tool that will integrate a function (by integration, I mean the integration one does in calculus).

    Does anyone know if Javascript can do integration? If so could you point me in the right direction.

    Thanks!
    Stephanie
    if Philip M suggestion don't give results you can try to implement something using a numeric integration alghoritm but for that the function must meet some condition. I also suggest, if you find such a library, to make extensive test to see how accurate is.
    In my opinion the table method is better, accurate and faster, .

    Edit: thank you for link, Philip M

    regards
    Last edited by oesxyl; 06-11-2008 at 08:03 PM.


  •  

    Posting Permissions

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