Linked Questions

6 votes
1 answer
1k views

New data type, interval, and overloading operators (+,-,*,/) [duplicate]

How can I create a new data type, interval, with different behavior than the built-in one. I want to write [a, b] and perform operator overloading, as in C ++? (I ...
plus91's user avatar
  • 440
3 votes
1 answer
271 views

Implementing new algebra for list-like objects [duplicate]

I would like to implement an algebra (addition, multiplication, etc.) for what is called "truncated power series" (TPSA) (Differential Algebraic description of beam dynamics). . These 'objects' (sets ...
Cedric H.'s user avatar
  • 696
602 votes
19 answers
156k views

Where can I find examples of good Mathematica programming practice?

I consider myself a pretty good Mathematica programmer, but I'm always looking out for ways to either improve my way of doing things in Mathematica, or to see if there's something nifty that I haven't ...
19 votes
2 answers
2k views

Is there any automatic differentiation package?

I'm wondering if an automatic differentiation package exists for Mathematica. This is what I mean by automatic differentiation.
faysou's user avatar
  • 11k
12 votes
2 answers
269 views

How to define Normal for new "data types"

In Mathematica 9 and earlier, one of the points under "Details"/"More Information" section for the function Normal was (this is gone after version 10): I have ...
QuantumDot's user avatar
  • 19.7k
8 votes
2 answers
841 views

How to do automatic differentiation?

Does Mathematica have any AD functionality or does it only support symbolic differentiation? If not, are there any packages or other third party implementations available? Edit (J. M.) Here is an ...
M.R.'s user avatar
  • 31.5k
2 votes
2 answers
201 views

How to define a new algebra using TagSet?

For example, I would like to define the algebra of quaternions. I coded something like ...
Curious Cat's user avatar
4 votes
2 answers
125 views

Implementing Dual Unit from Dual Numbers

I'm trying to implement the dual unit $\epsilon$ defined by $\epsilon^2 = 0$ into Mathematica but I'm having trouble defining $\epsilon^n = 0$ for $n\geq 2$. In this answer they simply use ...
Thomas 's user avatar
1 vote
2 answers
209 views

How implement Dual Quaternion algebra in Mathematica?

How can we manipulate and operate with dual quaternionic variables in Mathematica? Since a dual quaternion can be expressed like this $\hat q = a + \epsilon b $ where $a,b \in \mathbb{H}$, or ...
robson denke's user avatar
8 votes
0 answers
241 views

How would one add Hyperreals as a new type to Mathematica?

Hyperreals are an extension to the real numbers; they formalise the concepts of infinities and infinitestimals as numbers, rather than the named limit points outside of the system of reals and form ...
Julian Moore's user avatar
  • 2,560
1 vote
3 answers
112 views

A variable with a^2=0 [closed]

I want to do something simple. I want to define a variable such that a^2=0, so that say: Exp(a) = 1+a And any other function automatically f(a)=1+f'(0)a. Is it possible to do that in Mathematica?
user1505725's user avatar
2 votes
0 answers
52 views

Question to developers: what are the actual or potential difficulties in implementing split-complex unity $j$ out of the box?

I wonder, what are some real or potential and purely theoretic difficulties you may face if you decided to implement the split-complex unity $j$ such that $j^2=1$ along with already existing complex ...
Anixx's user avatar
  • 3,585