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?

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


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

  • $\begingroup$ Odd... note that FullSimplify[ Exp[-(-4. + y)^2]] (and other numbers) do not return zero. $\endgroup$ – bill s Mar 1 '16 at 14:55
  • $\begingroup$ See this Table[FullSimplify[ Exp[-(-N[n/1000] + y)^2]], {n, 4325, 4330}] $\endgroup$ – Artes Mar 1 '16 at 15:10
  • 1
    $\begingroup$ I am sure that this is a duplicate. Now if only I could find it ... $\endgroup$ – Szabolcs Mar 1 '16 at 15:14
  • $\begingroup$ 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. $\endgroup$ – kirma Mar 1 '16 at 15:17
  • 2
    $\begingroup$ 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]] $\endgroup$ – Szabolcs Mar 1 '16 at 15:22