C
600 bytes on disk with DOS line endings.
#define C B a,B b
#define D(N,O)B N(C){return a O b;}
#define E(A,B,C)i=A;j=B;k=C;X(m,p)X(m,m)X(t,t)X(d,t)X(t,d)X(d,d)Y(m,p)Y(p,p)Y(p,t)Y(p,d)Y(m,t)Y(m,d)
#define U"%.0f"
#define P(S,T)printf(U Z(S)U Z(T)U"="U"\n",v[i],v[j],v[k],
#define p +
#define m -
#define t *
#define d /
#define X(S,T)P(S,T)f##S(f##T(v[i],v[j]),v[k]));
#define Y(S,T)P(S,T)f##S(v[i],f##T(v[j],v[k])));
#define Z(A)#A
typedef double B;D(fp,+)D(fm,-)D(ft,*)B fd(C){return b?(int)(a/b+.5):-0.0;}main(int i,char*b[]){int j,k;B v[3]={atoi(b[1]),atoi(b[2]),atoi(b[3])};E(0,1,2)E(0,2,1)E(1,0,2)E(1,2,0)E(2,0,1)E(2,1,0)}
C doesn't seem to have NaN literals, so you get -0 if there's anything wrong rather than that.
However I think it fits the bill otherwise. (Note that the data type is double
so that if it DID have a NaN in there, it will get printed out as such by printf
.)