unaryPlus

+x

unaryPlus(x)

Try it yourself:

See also:

unaryPlus(): explicitly treat a value as positive

unaryPlus(x) is the leading plus operation, +x. For a number it leaves the value unchanged, while in an expression language it can make numeric intent explicit.

Why use it

Unary plus can clarify a formula and may coerce a compatible representation to numeric form according to the calculator’s rules. It is more about expression intent than arithmetic transformation.

Related operations

Use unaryMinus() to reverse the sign, numeric() for numerical evaluation, isNumeric() to validate input, and add() for binary addition.

Caveat

Do not rely on unary plus to clean malformed data; validate and parse external values deliberately.

Try Unary Plus in Calcul.io

Start with one of the editable examples above, then replace its arguments with your own values. Keeping the function on a separate calculator line makes the input and result easy to compare. For a longer workflow, assign the result to a variable or reference that line in the next expression.

Check the shown signature before adding optional arguments, and use the related-function links to compare operations with similar purposes.

All functions