# \[?\] Evaluate this constant expression?

**URL:** <https://community.wolfram.com/t/evaluate-this-constant-expression/11862>\
**Category:** Questions\
**Tags:** numerical-computation\
**Created:** [January 23, 2018, 5:08pm UTC](https://community.wolfram.com/t/evaluate-this-constant-expression/11862 "2018-01-23T17:08:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![enenkel](https://avatars.discourse-cdn.com/v4/letter/e/34f0e0/32.png) [@enenkel](https://community.wolfram.com/u/enenkel)\
**Post date:** [January 23, 2018, 5:08pm UTC](https://community.wolfram.com/t/evaluate-this-constant-expression/11862/1 "2018-01-23T17:08:42Z")

</div>

Is this a bug or a feature? I can’t figure out how to get Mathematica to evaluate this constant expression, Out[16]. If I apply N[] to it, it stays the same (Out[17]). Strangely, though, if I paste the same expression manually into a new line, In[18], it evaluates fine. Why? (I’m using Mathematica 10.3.1 for Linux x86.)

```
In[16]:= wHexToDec["3FFBB67AE8584CAA"]        

Out[16]= + 2^(0) + 2^(-1) + 2^(-3) + 2^(-4) + 2^(-5) + 2^(-7) + 2^(-8) +\
     > 2^(-10) + 2^(-11) + 2^(-14) + 2^(-15) + 2^(-16) + 2^(-17) + 2^(-19) +\
     > 2^(-21) + 2^(-22) + 2^(-23) + 2^(-25) + 2^(-30) + 2^(-32) + 2^(-33) +\
     > 2^(-38) + 2^(-41) + 2^(-42) + 2^(-45) + 2^(-47) + 2^(-49) + 2^(-51)

In[17]:= N[In[16]]                                                              

Out[17]= + 2^(0) + 2^(-1) + 2^(-3) + 2^(-4) + 2^(-5) + 2^(-7) + 2^(-8) +\
     > 2^(-10) + 2^(-11) + 2^(-14) + 2^(-15) + 2^(-16) + 2^(-17) + 2^(-19) +\
     > 2^(-21) + 2^(-22) + 2^(-23) + 2^(-25) + 2^(-30) + 2^(-32) + 2^(-33) +\
     > 2^(-38) + 2^(-41) + 2^(-42) + 2^(-45) + 2^(-47) + 2^(-49) + 2^(-51)

In[18]:= + 2^(0) + 2^(-1) + 2^(-3) + 2^(-4) + 2^(-5) + 2^(-7) + 2^(-8) +\       
         2^(-10) + 2^(-11) + 2^(-14) + 2^(-15) + 2^(-16) + 2^(-17) + 2^(-19) +\ 
         2^(-21) + 2^(-22) + 2^(-23) + 2^(-25) + 2^(-30) + 2^(-32) + 2^(-33) +\ 
         2^(-38) + 2^(-41) + 2^(-42) + 2^(-45) + 2^(-47) + 2^(-49) + 2^(-51)    

         3900231685776981
Out[18]= ----------------
         2251799813685248

In[19]:= N[Out[18]]                                                             

Out[19]= 1.73205

```

 ![math.jpg](https://global.discourse-cdn.com/wolfram/original/2X/a/a17ea57fe5bd5e8c7c3bb80e6d3d058c44e1c873.jpeg)

---

<div class="post-metadata">

**Author:** ![iliang](https://yyz1.discourse-cdn.com/wolfram/user_avatar/community.wolfram.com/iliang/32/11263_2.png) [@iliang](https://community.wolfram.com/u/iliang)\
**Post date:** [January 23, 2018, 5:42pm UTC](https://community.wolfram.com/t/evaluate-this-constant-expression/11862/2 "2018-01-23T17:42:59Z")

</div>

Take a look at `FullForm[wHexToDec[...]]`.

I wouldn’t be surprised if it is, say a string, and of course `N` will leave strings unchanged.

---

<div class="post-metadata">

**Author:** ![enenkel](https://avatars.discourse-cdn.com/v4/letter/e/34f0e0/32.png) [@enenkel](https://community.wolfram.com/u/enenkel)\
**Post date:** [January 23, 2018, 5:54pm UTC](https://community.wolfram.com/t/evaluate-this-constant-expression/11862/3 "2018-01-23T17:54:06Z")

</div>

Thanks, Ilian. You hit the nail on the head!

```
n[23]:= FullForm[wHexToDec["3FFBB67AE8584CAA"]]                                

Out[23]//FullForm= "+ 2^(0) + 2^(-1) + 2^(-3) + 2^(-4) + 2^(-5) + 2^(-7) +\
 > 2^(-8) + 2^(-10) + 2^(-11) + 2^(-14) + 2^(-15) + 2^(-16) + 2^(-17) +\
 > 2^(-19) + 2^(-21) + 2^(-22) + 2^(-23) + 2^(-25) + 2^(-30) + 2^(-32) +\
 > 2^(-33) + 2^(-38) + 2^(-41) + 2^(-42) + 2^(-45) + 2^(-47) + 2^(-49) +\
 > 2^(-51)"

```

If I apply ToExpression[] to it, I get what I wanted…

```
In[24]:= ToExpression[wHexToDec["3FFBB67AE8584CAA"]]                            

         3900231685776981
Out[24]= ----------------
         2251799813685248

```

Problem solved, thanks again!
