# Checking the first value for negitive

**URL:** <https://cl.desmos.com/t/checking-the-first-value-for-negitive/1228>\
**Category:** Questions\
**Created:** [July 16, 2020, 6:57pm UTC](https://cl.desmos.com/t/checking-the-first-value-for-negitive/1228 "2020-07-16T18:57:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Micah\_Baldree](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/micah_baldree/32/387_2.png) [@Micah\_Baldree](https://cl.desmos.com/u/Micah_Baldree)\
**Post date:** [July 16, 2020, 6:57pm UTC](https://cl.desmos.com/t/checking-the-first-value-for-negitive/1228/1 "2020-07-16T18:57:46Z")

</div>

I want students to write an equation in standard form. When they write it, standard form cannot have a negative coefficient with the x value in front. I normally use the evaluate code to compare entries with what is expected, but it wouldn’t catch if a number was negative because it wouldn’t effect the evaluation. Is there a way to assess if the front coefficient is negative so that I can send a warning message to students to make it positive?

---

<div class="post-metadata">

**Author:** ![Daniel\_Grubbs](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/daniel_grubbs/32/719_2.png) [@Daniel\_Grubbs](https://cl.desmos.com/u/Daniel_Grubbs)\
**Post date:** [July 16, 2020, 7:32pm UTC](https://cl.desmos.com/t/checking-the-first-value-for-negitive/1228/2 "2020-07-16T19:32:13Z")

</div>

Well if Ax+By=C, then -Ax-By=-C. So, you could parseEquation and check if the rhs (right hand side) evaluates to C. Or is it a specific equation?

---

<div class="post-metadata">

**Author:** ![Micah\_Baldree](https://yyz1.discourse-cdn.com/flex031/user_avatar/cl.desmos.com/micah_baldree/32/387_2.png) [@Micah\_Baldree](https://cl.desmos.com/u/Micah_Baldree)\
**Post date:** [July 16, 2020, 7:33pm UTC](https://cl.desmos.com/t/checking-the-first-value-for-negitive/1228/3 "2020-07-16T19:33:17Z")

</div>

Solid point, and easy enough to do. Thanks!
