# Using math.js plugin

**URL:** <https://forum.bubble.io/t/using-math-js-plugin/8511>\
**Category:** APIs\
**Created:** [December 4, 2016, 8:14pm UTC](https://forum.bubble.io/t/using-math-js-plugin/8511 "2016-12-04T20:14:23Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![jpeters1985](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@jpeters1985](https://forum.bubble.io/u/jpeters1985)\
**Post date:** [December 4, 2016, 8:14pm UTC](https://forum.bubble.io/t/using-math-js-plugin/8511/1 "2016-12-04T20:14:23Z")

</div>

Hey guys,

I think you’ll be able to help me in a second, I just can’t get it to run. I’ve installed the mathjs plugin. I have a simple input field, which I want to use for a simple calculation. The first step ist easy and also works fine (input field times 2).

The second step would be to add 6 to the doubled input, but i can’t get the formula (input\*2)+6) to put out the correct result. The output is incorrect and the following is displayed in the Debugger:

> Error connecting to MathJS: Error: Value expected (char 3)

Hope you can help

---

<div class="post-metadata">

**Author:** ![Scott](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/scott/32/565_2.png) [@Scott](https://forum.bubble.io/u/Scott)\
**Post date:** [December 5, 2016, 5:11am UTC](https://forum.bubble.io/t/using-math-js-plugin/8511/2 "2016-12-05T05:11:31Z")

</div>

Do you get the expected value on a mathjs expression parser, such as the one on [http://mathjs.org/](http://mathjs.org/)?

---

<div class="post-metadata">

**Author:** ![jpeters1985](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@jpeters1985](https://forum.bubble.io/u/jpeters1985)\
**Post date:** [December 5, 2016, 6:22am UTC](https://forum.bubble.io/t/using-math-js-plugin/8511/3 "2016-12-05T06:22:45Z")

</div>

Yes, I get the expected value. Even if I leave out the parentheses. Maybe I’m using the wrong syntax in the api call?

---

<div class="post-metadata">

**Author:** ![jpeters1985](https://avatars.discourse-cdn.com/v4/letter/j/8baadc/32.png) [@jpeters1985](https://forum.bubble.io/u/jpeters1985)\
**Post date:** [December 5, 2016, 10:53am UTC](https://forum.bubble.io/t/using-math-js-plugin/8511/4 "2016-12-05T10:53:09Z")

</div>

I solved it. The ±sign is not regonized somehow! I used the add(x,y) function instead.

---

<div class="post-metadata">

**Author:** ![mishav](https://sea1.discourse-cdn.com/bubble/user_avatar/forum.bubble.io/mishav/32/6420_2.png) [@mishav](https://forum.bubble.io/u/mishav)\
**Post date:** [December 5, 2016, 2:14pm UTC](https://forum.bubble.io/t/using-math-js-plugin/8511/5 "2016-12-05T14:14:17Z")

</div>

Possibly it needs to be url-encoded, i.e. the + sign means space, to send a plus send “%2B”.

@vega.andrew can you comment on this?

---

<div class="post-metadata">

**Author:** ![jorgecuadrafueyo](https://avatars.discourse-cdn.com/v4/letter/j/d78d45/32.png) [@jorgecuadrafueyo](https://forum.bubble.io/u/jorgecuadrafueyo)\
**Post date:** [February 6, 2017, 6:15am UTC](https://forum.bubble.io/t/using-math-js-plugin/8511/6 "2017-02-06T06:15:31Z")

</div>

Thanks! this one wasted a couple of hours of my time until I got to your answer
