# Symbolic sqrt(2) and sin(pi)

**URL:** <https://discourse.julialang.org/t/symbolic-sqrt-2-and-sin-pi/58633>\
**Category:** Specific Domains\
**Tags:** symbolic\
**Created:** [April 4, 2021, 7:03pm UTC](https://discourse.julialang.org/t/symbolic-sqrt-2-and-sin-pi/58633 "2021-04-04T19:03:25Z")\
**Posts on this page:** 1\
**Showing post:** 14

<div class="post-metadata">

**Author:** ![oscarbenjamin](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/oscarbenjamin/32/22868_2.png) [@oscarbenjamin](https://discourse.julialang.org/u/oscarbenjamin)\
**Post date:** [April 5, 2021, 3:10pm UTC](https://discourse.julialang.org/t/symbolic-sqrt-2-and-sin-pi/58633/14 "2021-04-05T15:10:08Z")

</div>

> [@CAS Best Practices](https://discourse.julialang.org/t/cas-best-practices/58092/75):
>
> If you want it exact, don’t ask for the Float64 result?
> 
> ```julia
> julia> ex = Term(sqrt,[big(2)])
> sqrt(2)
> 
> ```

There’s still something I don’t get:

```julia
julia> using Symbolics: Term

julia> @variables x
(x,)

julia> expr1 = Term(sqrt, [big(2)])
sqrt(2)

julia> expr2 = expr1 + x
x + sqrt(2)

julia> expr3 = substitute(expr2, Dict([x => 0]))
1.414213562373095048801688724209698078569671875376948073176679737990732478462102

julia> typeof(expr1)
Term{Real,Nothing}

julia> typeof(expr3)
Num

```

What I expected to happen is that `expr1` and `expr3` would be the same but instead `expr3` does not seem to be a symbolic object. You describe it as exact but the printed representation looks more like a high-precision approximation. In an exact representation I would expect to be able to query the object in some way to discover that it represents `sqrt(2)` symbolically but I don’t see a way to do that with `expr3`.

---

_[View the full topic](https://discourse.julialang.org/t/symbolic-sqrt-2-and-sin-pi/58633)._
