Is there a way to use Head to detect a symbolic fraction? In particular I find,
Head[a/b]
Head[1/5]
Times
Rational
where I would like to get Head[a/b] = Rational. I want to test if a symbolic expression is a fraction so I can use it in another function.
aandbcan be anything, since they are just symbols, I do not think it makes sense to saya/bis rational. If all you want is to check for the form, may be you can look atFullForm[a/b]and check for this form in your function by pattern matching? – Nasser Feb 02 '15 at 10:20