# Opposite number

**URL:** https://discourse.nodered.org/t/opposite-number/61761
**Category:** General
**Created:** [25 April 2022 17:27 UTC](https://discourse.nodered.org/t/opposite-number/61761 "2022-04-25T17:27:04Z")
**Posts on this page:** 4
**Page:** 1

<div class="post-metadata">

### Author: ![n1k0nx](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@n1k0nx](https://discourse.nodered.org/u/n1k0nx)
#### Post date: [25 April 2022 17:27 UTC](https://discourse.nodered.org/t/opposite-number/61761/1 "2022-04-25T17:27:04Z")

</div>

Dear guys  
How can I get the opposite number for example the paypoad is 4 and result in output is -4? I’ve teste the reverse palette but it don’t work or probably i’m the root cause of the problem 😉

Thank you in advance  
Regards

Luca

---

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [25 April 2022 17:35 UTC](https://discourse.nodered.org/t/opposite-number/61761/2 "2022-04-25T17:35:10Z")

</div>

Do you mean "how do I negate a number"?

Like this?  
 ![chrome_ZGyBOSnI6l](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/a/6/a621ce40ee6b16bcefcc8e41c7d3470068fb7ff7.gif)

Use a change node...  
 ![image](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/3X/7/1/71cfa9e4b98dfaaf1abd35f1a9ae85797cee8e87.png)

---

<div class="post-metadata">

### Author: ![n1k0nx](https://avatars.discourse-cdn.com/v4/letter/n/439d5e/32.png) [@n1k0nx](https://discourse.nodered.org/u/n1k0nx)
#### Post date: [25 April 2022 18:04 UTC](https://discourse.nodered.org/t/opposite-number/61761/3 "2022-04-25T18:04:20Z")

</div>

Yes thank you Steve! I’ll do the test asap!  
Regards  
Luca

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/flex026/uploads/nodered/original/1X/d073cd938eafa2e558d7c2cd59003b3ef4963033.png) [@system](https://discourse.nodered.org/u/system)
#### Post date: [24 June 2022 18:04 UTC](https://discourse.nodered.org/t/opposite-number/61761/4 "2022-06-24T18:04:59Z")

</div>

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.
