# Simple multiplcation function giving wrong for negative computation

**URL:** <https://forum.elixirforum.com/t/simple-multiplcation-function-giving-wrong-for-negative-computation/29737>\
**Category:** Questions\
**Tags:** programming\
**Created:** [March 10, 2020, 6:12am UTC](https://forum.elixirforum.com/t/simple-multiplcation-function-giving-wrong-for-negative-computation/29737 "2020-03-10T06:12:07Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![ityonemo](https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/ityonemo/32/11341_2.png) [@ityonemo](https://forum.elixirforum.com/u/ityonemo)\
**Post date:** [March 10, 2020, 6:25am UTC](https://forum.elixirforum.com/t/simple-multiplcation-function-giving-wrong-for-negative-computation/29737/2 "2020-03-10T06:25:16Z")

</div>

those results very much seem correct! I suggest unrolling your math carefully. Maybe do `Math.mul(4, -2)` by hand.

---

_[View the full topic](https://forum.elixirforum.com/t/simple-multiplcation-function-giving-wrong-for-negative-computation/29737)._
