# How to multiply (a + bi)(a + bi) with this Complex Number Class?

**URL:** <https://discourse.processing.org/t/how-to-multiply-a-bi-a-bi-with-this-complex-number-class/4073>\
**Category:** Coding Questions\
**Created:** [October 3, 2018, 9:40am UTC](https://discourse.processing.org/t/how-to-multiply-a-bi-a-bi-with-this-complex-number-class/4073 "2018-10-03T09:40:21Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![ProsExplorer](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/prosexplorer/32/1649_2.png) [@ProsExplorer](https://discourse.processing.org/u/ProsExplorer)\
**Post date:** [October 3, 2018, 11:22am UTC](https://discourse.processing.org/t/how-to-multiply-a-bi-a-bi-with-this-complex-number-class/4073/3 "2018-10-03T11:22:13Z")

</div>

Ohhh okay thank you that makes a lot more sense now! It actually is functional code now ha.

Would you happen to know the operation which would be exp(a+bi,n), where n is also a defined variable?  
This post had several operations for math, but not exponential operations [[Exponential grids / mobius transformations](https://discourse.processing.org/t/exponential-grids-mobius-transformations/1347/5)]. I’ve found this example elsewhere online, but it’s written for java.

```auto
    // return a new Complex object whose value is the complex exponential of this
    public Complex exp() {
        return new Complex(Math.exp(re) * Math.cos(im), Math.exp(re) * Math.sin(im));
    }

```

---

_[View the full topic](https://discourse.processing.org/t/how-to-multiply-a-bi-a-bi-with-this-complex-number-class/4073)._
