In Mathematica, you can construct a function f to have different definitions based on its input arguments. For example, ...
I'm experiencing a strange phenomenon. Here's a (quite artificial) test case: The following definition work just fine: ...
What is the most painless way to sum over n variables, for example, if the range of summation is $i_1 < i_2 < i_3 < \dots < i_n$, where $n$ is an argument of the function in question? Is ...
I never used Asserts in Mathematica, but trying to see what advantage they have over just argument check and additional definitions of the function to capture unwanted input. For example, which one ...