Is there an attribute for symbols that makes NumericQ
give True
? For example Pi
and E
are symbols that behave this way, but I can't figure out which attribute to give it.
NumericFunction
works well provided the symbol takes at least one argument:
SetAttributes[f,NumericFunction]
NumericQ[f]
(*False <--- I want this to be true*)
NumericQ[f[1]]
(*True*)
But I need something for just symbols.