The code like this

No idea why it defaults to -30
Use the debugger to see the values of the different variables to verify your block is calculating how you’re expecting. Otherwise, post a link to your project, as there may be something else happening completely outside of this block.
1 Like
It’s definitely something else going on, because if your absoluting the onput number and multiplying and dividing by positive numbers, then the output is always positive.

