Day 03 in Mat360

Last time: Next time:

Today:


Website maintained by Andy Long. Comments appreciated.
















































how many base-10 digits of accuracy you have to the left of the decimal point.















































Floor[Log[10, Abs[17.5]]]
Floor[Log[10, Abs[-.0235]]]

10^Floor[Log[10, Abs[17.5]]]
10^Floor[Log[10, Abs[-.0235]]]
















































An interval approximation for e:
$e{\in}[2.71828182{,2.71828183}]$
















































One that showed 0, 1, or 2 for positions; we don't see a "2" here.















































The figure illustrates two cases which won't work -- 1.44 and 1.45 -- each producing an interval beyond what the data support (the top line).

If not, and we must use 1.4, then another user would assume that we only know the 4 in the tenths place to within five units, and you can see what happens to the actual uncertainty -- it expands grossly, to the interval (0.9,1.9).

















































The speed of light in a vacuum.















































When

$|a+b|<<|a|$,

and, in particular, when $a+b{\approx}{0}$, i.e. when

$a{\approx}{-b}$.

Symmetrically, subtraction will suffer the problem when a and b are approximately equal.































































































TableRow[true_, approximate_] :=
 {error[true, approximate], 
  relativeError[true, approximate], 
  decimalsOfAccuracy[error[true, approximate]],
  digitsOfAccuracy[relativeError[true, approximate]]}
TableRow[1.2345, 1.2346]
TableRow[9.2345, 9.2346]
TableRow[10.2345, 10.2346]
TableRow[100.2345, 100.2346]
TableRow[1000.2345, 1000.2346]
















































a = 100;
astar = 100.1;
b = 101;
TableRow[true_, approximate_] :=
 {true, approximate, 
  100* relativeError[true, approximate]}
TableRow[a, astar]
TableRow[b - a, b - astar]
TableRow[(b - a)^2, (b - astar)^2]
TableRow[4.*a* b* Sin[Pi/360]^2, 4.*astar* b* Sin[Pi/360]^2]
TableRow[(b - a)^2 + 4.*a* b* Sin[Pi/360]^2, (b - astar)^2 + 
  4.*astar *b *Sin[Pi/360]^2]
TableRow[Sqrt[(b - a)^2 + 4.*a* b* Sin[Pi/360]^2], 
 Sqrt[(b - astar)^2 + 4.*astar* b *Sin[Pi/360]^2]]
TableRow[Sqrt[b^2 + a^2 - 2.*a* b* Cos[Pi/180]], 
 Sqrt[b^2 + astar^2 - 2.*astar* b* Cos[Pi/180]]]
















































cond[f_, a_] := Abs[f'[a]*a/f[a]]
cond[Exp, x]
cond[Log, x]
g[x_] = cond[Sin, x]
Plot[g[x], {x, 0, Pi/2}]