1
$\begingroup$

trying to do that:

In[15]:= FullForm[FullForm[1/a^2]]==FullForm[Power[a,-2]]                                                                                    

result is following

Out[15]= FullForm[Power[a, -2]] == Power[a, -2]

I would expect it to be true

Also, consider this session:

In[16]:= FullForm[FullForm[1/a^2]]                                                                                                           

Out[16]//FullForm= FullForm[Power[a, -2]]

In[17]:= Power[a,-2]                                                                                                                         

          -2
Out[17]= a

In[18]:= Out[16]==Out[17]                                                                                                                    

Out[18]= True

Is there a way to evaluate expression the exact same way interactive interpreter does it before putting into Out?..

$\endgroup$
  • 3
    $\begingroup$ It is really not clear to me what you want to accomplish here. Anyway, you would want to use === to compare those forms and force evaluation. That returns FullForm[FullForm[1/a^2]] === FullForm[Power[a, -2]] returns False. Consider also that FullForm, like most (all?) of the *Form functions, acts as a wrapper, which affects display but not evaluation. $\endgroup$ – MarcoB Jun 10 '18 at 23:37

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.