# How to get numerator and denominator

**URL:** <https://discourse.julialang.org/t/how-to-get-numerator-and-denominator/105623>\
**Category:** General Usage\
**Tags:** question, package, symbolics\
**Created:** [October 31, 2023, 5:24pm UTC](https://discourse.julialang.org/t/how-to-get-numerator-and-denominator/105623 "2023-10-31T17:24:08Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [October 31, 2023, 5:24pm UTC](https://discourse.julialang.org/t/how-to-get-numerator-and-denominator/105623/1 "2023-10-31T17:24:08Z")

</div>

I need to do a lot of symbolic math processing these days.

First question: How can a spit an expression in nominator and denominator?

```julia
using Symbolics

@variables R a b c d 

y = (2a+3b)/(4R - 3d)

# den=
# num=

```

---

<div class="post-metadata">

**Author:** ![jling](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/jling/32/212909_2.png) [@jling](https://discourse.julialang.org/u/jling)\
**Post date:** [October 31, 2023, 5:27pm UTC](https://discourse.julialang.org/t/how-to-get-numerator-and-denominator/105623/2 "2023-10-31T17:27:28Z")

</div>

> <https://github.com/JuliaSymbolics/Symbolics.jl/issues/431>
>
> could you please tell me how to get Numerator and denominator of expr
> 
> 
> 
> ┆Issue …is synchronized with this \[Trello card\](https://trello.com/c/BQpcElUp) by \[Unito\](https://www.unito.io)

---

<div class="post-metadata">

**Author:** ![ufechner7](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ufechner7/32/51363_2.png) [@ufechner7](https://discourse.julialang.org/u/ufechner7)\
**Post date:** [October 31, 2023, 5:31pm UTC](https://discourse.julialang.org/t/how-to-get-numerator-and-denominator/105623/3 "2023-10-31T17:31:56Z")

</div>

Thanks, this works nicely:

```julia
using Symbolics

@variables R a b c d 

y = (2a+3b)/(4R - 3d)

numerator, denominator = Symbolics.arguments(Symbolics.value(simplify(y)))
numerator, denominator

```
