# Evaluating PlusMinus to 2 decimal answers

How do I evaluate and expand an expression containing PlusMinus such that:

N[PlusMinus[1, 1]]


returns

2, 0

I'm stuck at PlusMinus[1, 1] giving me 1 \[PlusMinus] 1 ($$1 \pm 1$$) which is not very helpful for when I'm trying to evaluate larger equations in decimal form.

Are there scalable alternatives?

Edit: I don't have to use N[ ], a different function is perfectly fine (as long as I get a decimal answer).

• PlusMinus[1, 1] /. PlusMinus[a_, b_] :> {a + b, a - b}
– Syed
May 14 at 6:18
• @Syed Thank you, that is exactly what I'm after. Feel free to post that as an answer and I will mark it as correct May 14 at 6:21
• With v12.0 or later, use Around[1, 1] May 14 at 6:23
• I will request Bob Hanlon to write an answer about using PlusMinus and Around as I don't know much about Around at this point.
– Syed
May 14 at 6:35
• Around is what I'd recommend too, if you're managing uncertainty. You can also easily convert an Around expression into an Interval by just prefixing it (Interval[Around[1,1]]), and Intervals can be used in nice ways too—see the help docs. To do what you want to do here, you could do MinMax[Interval[Around[1,1]]]. (You could also streamline this by defining e.g. extrema[a_Around] := MinMax[Interval[a]].) May 14 at 6:49

Clear["Global*"]

a = Around[1, 1]


a == Around[NormalDistribution[1, 1]]

(* True *)

b = Around[3, 1]


b == Around[NormalDistribution[3, 1]]

(* True *)

a + b


Compare with

dist = TransformedDistribution[a2 + b2,
{a2 \[Distributed] NormalDistribution[1., 1.],
b2 \[Distributed] NormalDistribution[3., 1.]}];

#[dist] & /@ {Mean, StandardDeviation}

(* {4., 1.41421} *)


EDIT: As recommended by @thorimur, if the purpose is not to represent uncertainty, then use Interval

a = Interval@Around[1., 1.] // Chop

(* Interval[{0, 2.}] *)

MinMax@a

(* {0, 2.} *)

b = Interval@Around[3., 1.]

(* Interval[{2., 4.}] *)

MinMax@b

(* {2., 4.} *)

c = IntervalUnion[a, b]

(* Interval[{0, 4.}] *)

MinMax@c

(* {0, 4.} *)

d = a + b

(* Interval[{2., 6.}] *)

MinMax@d

(* {2., 6.} *)

a = CenteredInterval[1., 1.]


Information[a, "Bounds"] // N

(* {-1.86265*10^-9, 2.} *)

b = CenteredInterval[3., 1.]


Information[b, "Bounds"] // N

(* {2., 4.} *)

c = IntervalUnion[a, b]


Information[c, "Bounds"] // N

(* {-7.45058*10^-9, 4.} *)

d = a + b


Information[d, "Bounds"] // N

(* {2., 6.} *)

• I'll note that in terms of the original question ("evaluating" plus-or-minus), OP specifically seems to want e.g. MinMax@Interval@Around[1,1] so as to give {0,2}`. May 14 at 22:04