# strange FullSimplify result, why zero? [duplicate]

This came up looking at this How to speed up calculation of this equation (FindRoot).

Is there some sense to why FullSimplify gives zero here?

ClearAll[y]
FullSimplify[ Exp[-(-5. + y)^2]]


0.

Obviously incorrect for y->5. I don't think FullSimplify should be chopping numerically small values in any case.

• Odd... note that FullSimplify[ Exp[-(-4. + y)^2]] (and other numbers) do not return zero. Mar 1, 2016 at 14:55
• See this Table[FullSimplify[ Exp[-(-N[n/1000] + y)^2]], {n, 4325, 4330}] Mar 1, 2016 at 15:10
• I am sure that this is a duplicate. Now if only I could find it ... Mar 1, 2016 at 15:14
• The point where this breaks is Sqrt[Log[2^27]] (4.326080659802649..., can be positive or negative), which would point towards some sort of internal precision bug, although it's a quite odd one. Mar 1, 2016 at 15:17
• I guess the morale (from Ilian's explanation) is that one really shouldn't mix machine precision numbers with symbolic processing ... With arbitrary precision floats we don't get the problem, possibly because now Mathematica is able to recognize the precision loss: FullSimplify[Exp[-(-5.10 + y)^2]]` Mar 1, 2016 at 15:22