# 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[1]:= formula = 0.006101617526907695 + E^-(-7. + x)^2 +
E^(-1.0000502772595525 (4.899999190832501 + x)^2) -
0.002006784176061687 x^2;

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


Wait, what?

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


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

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

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


Well, at least it gets points for consistency.

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

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

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

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

In[10]:= FullSimplify[E^-(5. + x)^2]
Out[10]= 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 Oct 30, 2015 at 16:41
• It behaves more as you might expect if you use rationals, i.e., FullSimplify[E^-(5 + x)^2] Oct 30, 2015 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 Oct 30, 2015 at 17:17
• Nasty, this. Did you report this to WRI support? Oct 30, 2015 at 17:41
• @Szabolcs Why not a duplicate? It's the same situation, the lucky transformation is TrigExpand /@ ExpandAll /@ ExpToTrig[expr]. Oct 30, 2015 at 18:31