# How to get an absolute value of Around?

Around is a useful feature of Mathematica 12 to work with uncertain data.

x = Around[-1, {0.5, 1.5}]


$$-1.0^{+1.5}_{-0.5}$$

I'm curious how to get an absolute value of such uncertain data. When I use Abs directly I get an unexpected result:

Abs[x]


$$1.0^{+1.5}_{-0.5}$$

I have expected: $$1.0^{+0.5}_{-1.0}$$, because

Abs[x["Interval"]]


Interval[{0, 1.5}]

In total there are two issues:

1. Upper and lower uncertainties are not interchanged when taking Abs.

2. Crossing of zero is ignored.

Is this intended behaviour of Around or some sort of a bug?

How should I calculate absolute values of uncertain data points? For example, when I want to plot Abs of uncertain of data?

Update

Simple multiplication by a negative number gives incorrect result:

(-1)*x


$$1.0^{+1.5}_{-0.5}$$ (* Correct answer is $$1.0^{+0.5}_{-1.5}$$*)

• That some for support. Around is pretty new and apparently very buggy. Or the two uf us haven't understood the deeper meaning of Around, yet. Aug 9, 2019 at 23:13
• I guess @HenrikSchumacher's comment should begin That's one for support. ? Aug 10, 2019 at 16:33
• I wouldn't call this "buggy", it just looks like Abs doesn't support Around in its initial implementation (unless it is documented to do so). But if you'd like it to, then yes, reach out to support and ask for it.
– ktm
Aug 12, 2019 at 15:14
• @user6014 There are better ways to implement unimplemented functions, for example, keep the original symbolic form. Since it evaluates to incorrect result without warnings I would call it a bug. BTW multiplication of Around by a number is documented but still produces incorrect result. Aug 13, 2019 at 1:16
• -Around[-1, {0.5, 1.5}] has similar problems. The behavior of About seems consistent with f[About[x, {a,b}]] being About[f[x], {Abs[f'[x]]*a, Abs[f'[x]]*b}]. Aug 13, 2019 at 1:38

abs[val_, lBound_, uBound_] :=