# FullSimplify does freaky things with approximate Gaussians [duplicate]

I was playing around with Vitaliy Kaurov's neat answer to this question, and found something a bit unusual:

In:= formula = 0.006101617526907695 + E^-(-7. + x)^2 +
E^(-1.0000502772595525 (4.899999190832501 + x)^2) -
0.002006784176061687 x^2;

In:= formula // FullSimplify
Out= 0.00610162 - 0.00200678 x^2


Wait, what?

In:= FullSimplify[E^-(-7. + x)^2 +
E^(-1.0000502772595525 (4.899999190832501 + x)^2)]
Out= 0.


I have to say this is not the result I expected at all.

In:= FullSimplify[E^-(-7. + x)^2]
Out= 0.

In:= FullSimplify[E^(-1.0000502772595525 (4.899999190832501 + x)^2)]
Out= 0.


Well, at least it gets points for consistency.

In:= FullSimplify[E^-(-7. + x)]
Out= 1096.63 E^-x

In:= FullSimplify[E^-(-7. + x)^3]
Out= E^(-1. (-7. + x)^3)

In:= FullSimplify[E^-(-7. + x)^2.]
Out= E^-(-7. + x)^2.

In:= FullSimplify[E^-(-1. + x)^2]
Out= E^(-1. (-1. + x)^2)

In:= FullSimplify[E^-(5. + x)^2]
Out= 0.


I gotta say, the last one was sort of a relief. Just to be sure, I'll plot something I never expected to plot:

Plot[{Boole[FullSimplify[E^(-(y + x)^2)] === 0.]}, {y, -7, 7}] FWIW, this is Mathematica 10.3.

• Same results on V9 for your ... ehemm .... relief – Dr. belisarius Oct 30 '15 at 16:41
• It behaves more as you might expect if you use rationals, i.e., FullSimplify[E^-(5 + x)^2] – bill s Oct 30 '15 at 16:56
• This does not happen in V8.0.1 in OSX 10.10.5. It does happen in V10.0 in OSX 10.10.5 – march Oct 30 '15 at 17:17
• Nasty, this. Did you report this to WRI support? – Sjoerd C. de Vries Oct 30 '15 at 17:41
• @Szabolcs Why not a duplicate? It's the same situation, the lucky transformation is TrigExpand /@ ExpandAll /@ ExpToTrig[expr]. – ilian Oct 30 '15 at 18:31