Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for integral #323

Open
nedisy opened this issue Jan 22, 2022 · 8 comments
Open

Support for integral #323

nedisy opened this issue Jan 22, 2022 · 8 comments

Comments

@nedisy
Copy link
Contributor

nedisy commented Jan 22, 2022

Hello, I'm working on integral support for this repo. But I found it hard to get good performance and good accuracy at the same time for the numerical integrator. Currently, I use a nonadaptive version of Cash-Karp. When I use it to calculate pi using the area under a semicircle, it is only accurate to the 8th digit tho. Any ideas to improve?

Also, I'm working on the cache system for mathjs evaluation (no code yet) so that the call can be less than 0.1 ms--as mathjs evaluation took a lot of time. With a conservative amount of draw calls around 10k, it will take 1 s to complete. Anything more is kinda unacceptable IMO.

okay so, what do you think? should I continue or are you already working on a similar code?

@nedisy nedisy mentioned this issue Jan 23, 2022
@o-b-o
Copy link

o-b-o commented Jan 26, 2022

being accurate to the 8th digit is pretty good though?
You could do second order finite centered differences with a matrix.
IMO you don't need too much accuracy for a graph, since we are not actually reporting any numbers.

@o-b-o
Copy link

o-b-o commented Jan 26, 2022

I mean, the visual difference between 3.14 and 3.1415926535897932384626433... is pretty minor

@nedisy
Copy link
Contributor Author

nedisy commented Jan 27, 2022

We are reporting a number in "variable or function", like Desmos does, and it shows to 12th digit

@o-b-o
Copy link

o-b-o commented Jan 28, 2022

oh, that's pretty cool
Maybe you can choose a "high power" integrator, one which may take longer to compute, and a "low power" integrator which may help graph integrals without the 12th digit precision

@nedisy
Copy link
Contributor Author

nedisy commented Jan 28, 2022

or, tell the users that it uses numerical integrator, and for certain equations, it can be inaccurate

@o-b-o
Copy link

o-b-o commented Jan 28, 2022

good call

@Zaq-Xander
Copy link

This sounds really cool, even at low precision. I'm currently computing complex Fourier series coefficients to visualise in Math3D and it is infinitely more tedious to copy them manually off a calculator. In-built support, even if only accurate to a few decimal places, would be greatly appreciated :)

@o-b-o
Copy link

o-b-o commented Feb 1, 2022

that complex fourier series thing sounds awesome, would you like to share? :p

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants