我想将数字与进行比较。
如果我选择了绝对公差,那么:
如果我选择了相对容差,那么:
当我设置时会发生什么?相对公差检查是否会覆盖绝对公差检查?
我想将数字与进行比较。
如果我选择了绝对公差,那么:
如果我选择了相对容差,那么:
当我设置时会发生什么?相对公差检查是否会覆盖绝对公差检查?
这在很大程度上取决于它在特定软件中的实现方式,因此您需要检查文档或源代码。对于lsoda,文档指出:
The estimated local error in Y(i) will be controlled
so as to be roughly less (in magnitude) than
EWT(i) = RTOL*ABS(Y(i)) + ATOL if ITOL = 1, or
EWT(i) = RTOL*ABS(Y(i)) + ATOL(i) if ITOL = 2.
Thus the local error test passes if, in each
component, either the absolute error is less than
ATOL (or ATOL(i)), or the relative error is less
than RTOL.
Use RTOL = 0.0 for pure absolute error control, and
use ATOL = 0.0 (or ATOL(i) = 0.0) for pure relative
error control. Caution: Actual (global) errors may
exceed these local tolerances, so choose them
conservatively.
所以在这种情况下,无论满足哪个容差都会覆盖另一个容差。