I would like to 'Simplify'
Sqrt[5/6]/2
to
Sqrt[5/24]
I've tried to penalize Times and Rational using ComplexityFunction, but something like
mysim[e_] :=
100 (Count[e, _Times, {0, Infinity}] +
Count[e, _Rational, {0, Infinity}]) + LeafCount[e]
did not do work.
Suggestions are appreciated
2/4
(i.e.Rational[2,4]
) is immediately and automatically transformed to1/2
.Divide[a, b]
is immediately transformed toTimes[a,Power[b,-1]]
.b+a
becomesa+b
. Such canonicalization aids equality testing. Similarly,Sqrt[5/24]
immediately evaluates toSqrt[5/6]/2
. ThusSimplify
can never return the former. $\endgroup$Sqrt[5/24]
in its given form,Hold
orHoldForm
must be applied. I'm not commenting on whether that can be done with Simplify conveniently or whether it is worth doing, but it's likely not very simple to do. $\endgroup$