# Problems with fractions

**URL:** <https://discourse.processing.org/t/problems-with-fractions/29605>\
**Category:** Beginners\
**Created:** [April 24, 2021, 4:10pm UTC](https://discourse.processing.org/t/problems-with-fractions/29605 "2021-04-24T16:10:00Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![GoToLoop](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/gotoloop/32/86_2.png) [@GoToLoop](https://discourse.processing.org/u/GoToLoop)\
**Post date:** [April 24, 2021, 4:17pm UTC](https://discourse.processing.org/t/problems-with-fractions/29605/2 "2021-04-24T16:17:01Z")

</div>

> [@Unable to generate proper float value in Processing](https://discourse.processing.org/t/unable-to-generate-proper-float-value-in-processing/29352/2):
>
> At least 1 of the variables i or n needs to be of datatype float for the operator / to evaluate its operands as a float value. face_with_monocle Alternatively you can temporarily upcast 1 of the variables to float: float k = kMax \* sqrt( (float) i / n );

---

_[View the full topic](https://discourse.processing.org/t/problems-with-fractions/29605)._
