Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I really wish Mathematica would open-source the heuristics behind these core functions (including common mathematical functions, Simplify, Integrate, etc.). The documentation is good, but it still lags behind the actual implementation. It would be much easier if we could peek inside the black box.
 help



That blackbox being their entire moat, I would assume they'd never want to open-source any function. Mathematica as a front-end has innumerable frustrating bugs, but its CAS is top-notch. Especially combined with something like Rubi for integration, for me nothing comes close to Mathematica for algebraic computations.


Many built-in functions are open source too. Use the "PrintDefinitions" ResourceFunction to see the code of functions that are implemented in Wolfram Language itself.

For Simplify, I expect its a black, or at least gray box to Mathematica maintainers, too.

It will have simple rules such as constant folding, “replace x - x by zero”, “replace zero times something with the conditions under which ‘something’ has a value”, etc, lots of more complex but still easy to understand rules with conditionals such as “√x² = |x| if x is real”, and some weird logic that decides the order in which to try simplification rules.

There’s an analogy with compilers. In LLVM, most optimization passes are easy to understand, but if you look at the set of default optimization passes, there’s no clear reason for why it looks like it looks, other than “in our tests, that’s what performed best in a reasonable time frame”.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: