14 ms·
This is really cool. Two things, though: 1. Is there a way to do integrals? Are there plans to add that support? 2. Though the UI doesn't block up when you do
by akovaski 11y ago
This is really cool. Two things, though:
1. Is there a way to do integrals? Are there plans to add that support?
2. Though the UI doesn't block up when you do a large calculation, the calculations do. e.g. I try to sum from 0 to 10^20, then realize I just wanted to sum 0 to 20. If I change the equation, it seems like it has to complete the first calculation to get to the new calculation.
- jwmerrill 11y ago> 1. Is there a way to do integrals? Are there plans to add that support? We don't do integrals right now, but I hope we'll be able to add them at some point. It can be pretty tricky to do integrals accurately for non-smooth or highly oscillatory functions. Here's a graph I made recently exploring an interesting numerical integration technique called tanh-sinh quadrature: https://www.desmos.com/calculator/jg4wamuwde https://www.desmos.com/calculator/jg4wamuwde 2. ... If I change the equation, it seems like it has to complete the first calculation to get to the new calculation. Right, we currently wait for existing calculations to finish before starting new ones. We've experimented with strategies for killing calculations that look like they're hung, but we don't do anything like that right now. Killing and respawning webworkers is expensive and has been crashy in various browsers at various times, and short of that, it's hard to stop calculations midway through.
- abecedarius 11y agoIt's possible to compile the calculation code to work in batches -- for example, http://wry.me/hacking/Turing-Drawings/ http://wry.me/hacking/Turing-Drawings/ which compiles a 2d Turing machine into an asm.js function parameterized by how many steps to take in an uninterruptible batch. Another example of batching for responsiveness: http://wry.me/hacking/powersp.html http://wry.me/hacking/powersp.html It's also easy for me to suggest more work for you!