# numericValue for a fraction

**URL:** <https://cl.desmos.com/t/numericvalue-for-a-fraction/439>\
**Category:** Questions\
**Tags:** validation, correctness\
**Created:** [April 9, 2019, 5:09pm UTC](https://cl.desmos.com/t/numericvalue-for-a-fraction/439 "2019-04-09T17:09:50Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![kayarenas](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/kayarenas/32/151_2.png) [@kayarenas](https://cl.desmos.com/u/kayarenas)\
**Post date:** [April 9, 2019, 5:09pm UTC](https://cl.desmos.com/t/numericvalue-for-a-fraction/439/1 "2019-04-09T17:09:50Z")

</div>

I want to check for correctness on a fraction of 5/13. It doesn’t like my slash sign. What should I be using for fractions in the computation layer?

---

<div class="post-metadata">

**Author:** ![JayChow](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jaychow/32/1674_2.png) [@JayChow](https://cl.desmos.com/u/JayChow)\
**Post date:** [April 9, 2019, 5:22pm UTC](https://cl.desmos.com/t/numericvalue-for-a-fraction/439/2 "2019-04-09T17:22:03Z")

</div>

If you’re checking strings you can type in the latex (with the extra backslash) `\\frac{5}{13}` otherwise I’d recommend checking for a numeric value within a tolerance range (round up and down to a few decimal places and look for a value between the two.

---

<div class="post-metadata">

**Author:** ![ASmith](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/asmith/32/360_2.png) [@ASmith](https://cl.desmos.com/u/ASmith)\
**Post date:** [April 9, 2019, 5:27pm UTC](https://cl.desmos.com/t/numericvalue-for-a-fraction/439/3 "2019-04-09T17:27:00Z")

</div>

Is it also possible to put a variable in the graph and assign it the value 5/13. Then compare the answer to the variable?

---

<div class="post-metadata">

**Author:** ![kayarenas](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/kayarenas/32/151_2.png) [@kayarenas](https://cl.desmos.com/u/kayarenas)\
**Post date:** [April 9, 2019, 5:27pm UTC](https://cl.desmos.com/t/numericvalue-for-a-fraction/439/4 "2019-04-09T17:27:53Z")

</div>

I used the tolerance range and that works perfectly! Thank you!

---

<div class="post-metadata">

**Author:** ![JayChow](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/jaychow/32/1674_2.png) [@JayChow](https://cl.desmos.com/u/JayChow)\
**Post date:** [April 9, 2019, 5:30pm UTC](https://cl.desmos.com/t/numericvalue-for-a-fraction/439/5 "2019-04-09T17:30:04Z")

</div>

Absolutely, and thats the preferred method. Method above in case you don’t have a graph handy and need to do it in CL!

Still, don’t forget to add tolerance in, esp when working with long decimal strings
