Tag Info

New answers tagged

1

This is not actually an explanation, just some insights. In order to see whats going here I modified your code in the following way: Remove[f]; SetAttributes[f, {Flat, OneIdentity}]; f[0, i_] := i /; (Print[{0, i}]; True) f[i_, 0] := i /; (Print[{i, 0}]; True) f[i_, i_] := 0 /; (Print[{i, i}]; True) f[i_, j_] := 6 - i - j /; (Print[{i, j}]; True) For ...


1

I'm not sure if this is the official way to do it, but at least in 8.0.0.0 you can simply assign it: NumericQ[f] = True For example: N[twopi, n_] := N[2*Pi, n] NumericQ[twopi] = True {twopi, twopi > 1} (* ==> {twopi, True} *)



Top 50 recent answers are included