Around
更多信息
- Around[x,δ] 通常显示为 x±δ. 如果与 x 相比 δ 非常小,如 Around[1.2345678,0.0000012],则代之以像
这样的形式. - Around[x,δ] 可用于表示存在统计或其他不确定性的测量结果.
- Around[x,Scaled[ϕ]] 表示相对误差为 ϕ 的数字,对应于 Around[x,ϕ x].
- 当在计算中使用 Around 时,假设没有相关性,默认情况下用一阶级数近似来传播不确定性.
- 可用 Around[…]["prop"] 提取下列属性:
-
"Value" Around[x,δ] 的中心值 x "Uncertainty" Around[x,δ] 中的不确定度 δ "Number" 值为 x,准确度为 δ 的数字 "Interval" Interval[{x-δ,x+δ}] - 在 Around[s] 中,可用以下方式指定数字及其不确定度:
-
x (近似数) Around[x,(10^-Accuracy[x])/2] Interval[{xmin,xmax}] Around[(xmax+xmin)/2,(xmax-xmin)/2] dist (统计分布) Around[Mean[dist],StandardDeviation[dist]] list(元素列表) Around[Mean[list],StandardDeviation[list]] "nn.dddd" (数字字符串) (不确定性由有效数字的个数决定) - 对于线性计算,Around[x,δ] 就像一个数字,其值服从正态分布 NormalDistribution[x,δ].
- Around 对象 Around[x1,δ1] 和 Around[x2,δ2] 上的关系运算符如 Less、Equal 和 Greater 会根据中心 x1 和 x2 的距离是大于还是小于 2
的结果,来判断是否返回 True 或 False. 当与 Around 对象比较时,数字会被赋予零不确定性. - NumericalOrder 根据 Around 对象的中心值进行排序,不考虑不确定区间。
- 在 Around[x,δ] 中,值 x 和不确定度 δ 可以是任何数值表达式或符号表达式. 如果 δ 是数值表达式,那么 x 和 δ 将被数字化. 默认情况下,将使用机器精度,但如果需要准确表示数字,可以使用更高的精度.
- Around[x,δ] 显示具有一位或两位数字的不确定度 δ;x 的小数点右边的位数与 δ 中所示的位数相同.
- 在 Around[x,δ] 中,x 和 δ 可以是单位不同的量,但单位要互相兼容.
- Around[{x1,x2,…},δ] 依次作用于第一个参数列表中的各项;视 xi 的各个不确定度为不相关.
范例
打开所有单元 关闭所有单元基本范例 (7)
Around[1.3421, 0.012]Around[-1.3421 10 ^ -7, 1.2 10 ^ -8]Around[RandomReal[{-1, 1}], 10 ^ -8]单位不同的不确定 Quantity 对象:
Quantity[Around[140.764, 0.023], "Meters" / "Seconds"]Around[Quantity[23.425, "Meters"], Quantity[13, "Millimeters"]]UnitConvert[%, "Inches"]具有非对称不确定度的 Around 对象:
Around[56.723, {0.18, 0.076}]用 Around 对象进行计算:
Around[1, .1] + Around[2, .4]Exp[Around[2, .1]]绘制 Around 对象组成的列表:
ListPlot[{Around[1, .1], Around[2, .2], Around[3, .3]}]提取 Around 对象的部分内容:
a = Around[Sqrt[3], 0.012345]a["Value"]a["Uncertainty"]同一个 Around 对象的两个不同实例被认为是不相关的:
Around[2, 0.1] + Around[2, 0.1]2Around[2, 0.1]范围 (24)
不确定的对象 (9)
Around[52.241, 0.123]Around[Sqrt[17], 0.73]Around[-17 / 2, 1 / 2]Around[21 ^ 21, 19 ^ 19]Around[0, 0.004]Around[23.28, {0.31, 0.72}]Around[-23.28, {0.31, 0.72}]Around[Sqrt[101], {Sqrt[5], Sqrt[7]}]Around[4.1836, Scaled[0.05]]Around[4.1836, Scaled[Quantity[5, "Percent"]]]不确定的 Quantity 对象:
Quantity[Around[1.73, 0.21], "Yards"]Around[Quantity[5, "Minutes"], Quantity[7, "Seconds"]]Around[Quantity[100, "Kilometers" / "Hours"], Quantity[2, "Kilometers" / "Hours"]]InputForm[%]Around[Quantity[3, "Meters"], {Quantity[5, "Centimeters"], Quantity[2, "Inches"]}]Around[12.7172 10 ^ 7, 3.42]Around[12.7172, 3.42]Around[12.7172 10 ^ -7, 3.42]Around[12.7172, 3.42]Around[12.7172, 3.42 10 ^ -7]Around[12.7172, 3.42 10 ^ 5]Around[3.56, Scaled[0.3]]用 Quantity 百分数表示同一个对象:
Around[3.56, Scaled[Quantity[30, "Percent"]]]任意量纲的 Quantity 值:
Around[Quantity[-34.78, "Newtons"], Scaled[0.04]]Around[Quantity[-34.78, "Newtons"], Scaled[Quantity[4, "Percent"]]]使用符号式 Around 对象:
a = Around[x, δ]a ^ 2Exp[a]将符号式 Around 对象相加,假定不确定度互不相关:
Around[x, Subscript[δ, x]] + Around[y, Subscript[δ, y]]访问器和转换 (5)
提取 Around 对象的值和不确定度:
a = Around[-12.4728, 0.0031]a["Value"]a["Uncertainty"]根据 Around 对象构建有限精度数:
a = Around[-12.4728, 0.0031]number = a["Number"]Accuracy[number](10 ^ -%) / 2根据有限精度数重建原来的 Around 对象:
Around[number]构建以 Around 对象的值为中心的区间,半区间宽度为该对象的不准确度:
a = Around[-12.4728, 0.0031]interval = a["Interval"]根据区间重建原来的 Around 对象:
Around[interval]用 Around 对含有数字的字符串进行转换,假设最后一位有效数字的不确定度为 0.5:
Around["1.23"]Around["1.2300"]Around["-1.23e7"]Around["-1.2300D-7"]用 Around 对含有数字的字符串进行转换,且其中的数字带有不确定性:
Around["1.23+-0.06"]Around["-1.23±0.06"]Around["1.7861 pm 6.e-3"]Around["1.7861+0.0048-0.0023"]用不确定对象进行计算 (4)
Around[1, 0.5] + Around[4, 0.4]Around[1, 0.5] + Around[4, {0.7, 0.4}]Around[1, 0.5]Around[4, 0.4]Around[1, 0.5]Around[4, {0.7, 0.4}]Around[2, 0.1] ^ Around[4, 0.2]Around[2, 0.1] ^ Around[4, {0.7, 0.4}]用 Quantity 对象进行基本运算:
Around[Quantity[1, "Meters"], Quantity[5, "Centimeters"]] + Around[Quantity[3, "Feet"], Quantity[2, "Inches"]]UnitConvert[%, "Inches"]Quantity[Around[10, 1], "Kilometers" / "Hours"]Around[Quantity[2, "Minutes"], Quantity[12, "Seconds"]]构建一个 QuantityArray 对象,其中的元素为 Around 对象:
QuantityArray[{Quantity[Around[1, 0.1], "Farads"], Quantity[Around[2, 0.2], "Farads"]}]执行计算,保留 QuantityArray 结构:
% ^ 2Normal[%]用符号式 Around 对象进行基本运算:
a = Around[x, δ]3aa ^ 4Log[5a]Tanh[a + 1]不确定对象的比较和排序 (6)
比较两个中心相距甚远的 Around 对象:
a1 = Around[1.18, 0.24]
a2 = Around[4.3, 0.35]{a1 < a2, a1 <= a2, a1 == a2, a1 >= a2, a1 > a2}a2 - a1比较中心较近的 Around 对象:
a1 = Around[3.18, 0.34]
a2 = Around[3.55, 0.52]{a1 < a2, a1 <= a2, a1 == a2, a1 >= a2, a1 > a2}a2 - a1比较有一个数字的 Around 对象:
a = Around[2.73, 0.12]x = 2{a < x, a <= x, a == x, a >= x, a > x}a - 2比较有 Quantity 中心和不确定性的 Around 对象:
a1 = Around[Quantity[4, "Feet"], Quantity[2, "Inches"]]a2 = Around[Quantity[1, "Meters"], Quantity[2, "Centimeters"]]{a1 < a2, a1 <= a2, a1 == a2, a1 >= a2, a1 > a2}a1 - a2//UnitConvert对 Around 对象和数字集合进行数值排序:
arounds = Inner[Around, RandomReal[10, 4], RandomReal[2, 4], List]numbers = RandomReal[10, 4]NumericalSort[Join[arounds, numbers]]NumericalSort[{Around[Quantity[4., "Meters"/"Seconds"], Quantity[20., "Centimeters"/"Seconds"]], Quantity[Around[5.3, 0.5], "Kilometers"/"Hours"], Quantity[Around[6.2, 0.4], "Knots"]}]%//UnitConvert应用 (3)
ListPlot[Table[Around[n, RandomReal[3]], {n, 20}]]rmdata = DeleteMissing[ExoplanetData[EntityClass["Exoplanet", All], {EntityProperty["Exoplanet", "Mass", {"Uncertainty" -> "Around"}], EntityProperty["Exoplanet", "Radius", {"Uncertainty" -> "Around"}]}], 1, 1];Length[rmdata]Take[rmdata, 3]ListPlot[rmdata, ...]meanM = Mean[rmdata[[All, 1]]]meanR = Mean[rmdata[[All, 2]]]meanM / Entity["Planet", "Earth"]["Mass"]meanR / Entity["Planet", "Earth"]["Radius"]使用值
作为地球重力,并假设这些量的最后一个有效位数为一个单位的不确定性,来计算长度为
的摆的振荡周期:
First@FormulaData[{"PendulumSmallOscillations", "Standard", "Period"}]% /. {l -> Quantity[Around[75, 1], "Centimeters"], g -> Quantity[Around[9.80, 0.01], "Meters" / "Seconds" ^ 2]}属性和关系 (3)
对 Around 对象取平方,使用一阶级数近似:
Around[10, 1] ^ 2用 TransformedDistribution 进行相应的精确计算:
dist = TransformedDistribution[s ^ 2, sNormalDistribution[10, 1]]Around[Mean[dist], StandardDeviation[dist]]AroundReplace[s ^ 2, s -> Around[10, 1], 2]直接在非对称分布上使用 Around 会返回具有非对称不确定度的对象:
Around[dist]dist = NormalDistribution[5, 0.3];scalars = RandomVariate[dist, 100];Around[scalars] 估计分布的均值和标准差:
Around[scalars]Around[dist] 给出分布 dist 的真实参数:
Around[dist]MeanAround[scalars] 描述分布的均值和均值的标准误差:
MeanAround[scalars]Around[x,δ] 和 CenteredInterval[x,δ] 在数值运算中使用不同的传播规则:
a = Around[12, 1]a ^ 3c = CenteredInterval[12, 1]c ^ 3文本
Wolfram Research (2019),Around,Wolfram 语言函数,https://reference.wolfram.com/language/ref/Around.html (更新于 2023 年).
CMS
Wolfram 语言. 2019. "Around." Wolfram 语言与系统参考资料中心. Wolfram Research. 最新版本 2023. https://reference.wolfram.com/language/ref/Around.html.
APA
Wolfram 语言. (2019). Around. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/Around.html 年
BibTeX
@misc{reference.wolfram_2026_around, author="Wolfram Research", title="{Around}", year="2023", howpublished="\url{https://reference.wolfram.com/language/ref/Around.html}", note=[Accessed: 11-July-2026]}
BibLaTeX
@online{reference.wolfram_2026_around, organization={Wolfram Research}, title={Around}, year={2023}, url={https://reference.wolfram.com/language/ref/Around.html}, note=[Accessed: 11-July-2026]}