I was surprised to see FullSimplify make my expressions numerically unstable. The result can be summarized below:
FullSimplify[-E^-t, ComplexityFunction -> LeafCount] (* -E^-t *)
FullSimplify[-E^-t] (* -Cosh[t]+Sinh[t] *)
Last time I dove deep into Mathematica, LeafCount was the default complexity measure, but this seems to have changed sometime in the last 10 years...what is the new heuristic?
LeafCount7. In the documentation forComplexityFunctionyou can read: With the default settingComplexityFunction->Automatic, forms are ranked primarily according to their LeafCount, with corrections* to treat integers with more digits as more complex.* This is probably the reason whyAutomaticconverges to one solution andLeafCountto another. – Domen Sep 09 '21 at 10:50FullSimplify[-E^-t, ComplexityFunction -> Simplify`SimplifyCount]– kglr Sep 09 '21 at 10:51