britchick

06-11-2008, 07:22 PM

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

Philip M

06-11-2008, 07:36 PM

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.

oesxyl

06-11-2008, 07:59 PM

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, :).

thank you for link, Philip M

regards