# Math/sqrt problem!

**URL:** <https://forum.kirupa.com/t/math-sqrt-problem/306228>\
**Category:** flash\
**Created:** [March 11, 2010, 12:46pm UTC](https://forum.kirupa.com/t/math-sqrt-problem/306228 "2010-03-11T12:46:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Atroxe](https://avatars.discourse-cdn.com/v4/letter/a/f1d935/32.png) [@Atroxe](https://forum.kirupa.com/u/Atroxe)\
**Post date:** [March 11, 2010, 12:46pm UTC](https://forum.kirupa.com/t/math-sqrt-problem/306228/1 "2010-03-11T12:46:57Z")

</div>

Second thread of the day, it’s rainin noobfish.

Buteh, I sat down to creat a small app to calculate X in order to solve 2nd grade equations.

So, in order to manage this I had to translate "x = -p/2 ± sqrt((p/2)^2 - q), right?

And!  
Everything works fine until I reach the step when I must perform equations with -p/2 and sqrt((p/2)^2 - q).

Adding and/or subtracting with these numbers causes Flash to return NaN. Why does it do this to me?
