Rappresentazioe in macchina ed Errore

Numeri Macchina

$\mathcal{F}_{(\beta,t,m,M)}$ dove:

minimo numero positivo rappresentabile → $\omega = \beta^{-m-1}$ massimo numero positivo rappresntabile → $\Omega=\beta^M(1-\beta^{-t})$ numeri compresi tra $\omega$ e $\Omega$ → $(m+M+1)(\beta^t-\beta^{t-1})$ → altrettanti rappresentabili con segno negativo e lo 0 non è incluso.

precisione di macchina → $u = \beta^{1-t}$

Errore

errore assoluto → $\tilde{x}-x$ errore relativo → $\varepsilon_x=\frac{\tilde{x}-x}{x}$

errore inerente → $\varepsilon_{IN} = \frac{x}{f(x)}f'(x)\varepsilon_x$ → condizionamento del calcolo di $f(x)$

errore algoritmico → $\varepsilon_{ALG}$ → metodo del grafo con archi pari a coefficienti

errore su op i-esima → $\varepsilon_{TOT}^{(i)} = \varepsilon_{OP} + c_1 \varepsilon_{TOT}^{(k)} + c_2 \varepsilon_{TOT}^{(s)}$ → $c_1$ e $c_2$ coefficienti

coefficienti operazioni base:

$\div \rightarrow x\div y \ \ c_1 = 1 \ c_2 = -1$

$+\rightarrow x+y \ \ c_1 = \frac{x}{x+y} \ c_2 = \frac{y}{x+y}$

$-\rightarrow x-y \ \ c_1 = \frac{x}{x-y} \ c_2 = \frac{y}{x-y}$

$\cdot \rightarrow x\cdot y \ \ c_1 = 1 \ c_2 = 1$

Matrici, vettori, norme, etc…

Operazioni con gli scalari

scalare per vettore e vettore trasposto:

$$ k\cdot v = k\begin{bmatrix} v_1 \\ v_2 \\v_3 \end{bmatrix} =\begin{bmatrix} kv_1\\kv_2\\kv_3 \end{bmatrix} \ \ \ \ \ \ \ k\cdot v^T = k\begin{bmatrix} v_1 & v_2 & v_3 \end{bmatrix} =\begin{bmatrix} kv_1 & kv_2 & kv_3 \end{bmatrix} $$

scalare per matrice:

$$ kA=k\begin{bmatrix}a_{11} & \dotsb & a_{1n} \\ \vdots & \ddots & \vdots \\ a_{n1} & \dotsb & a_{nn} \end{bmatrix} = \begin{bmatrix}ka_{11} & \dotsb & ka_{1n} \\ \vdots & \ddots & \vdots \\ ka_{n1} & \dotsb & ka_{nn} \end{bmatrix} $$

Operazioni con i vettori

somma di vettori:

$$ v + w = \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix} + \begin{bmatrix} w_1 \\ w_2 \\ w_3 \end{bmatrix}

\begin{bmatrix} v_1 + w_1 \\ v_2 + w_2 \\ v_3 + w_3 \end{bmatrix} $$

prodotto scalare tra vettore trasposto e vettore:

$$ v^Tw=\begin{bmatrix} v_1 & v_2 & v_3 \end{bmatrix}\begin{bmatrix} w_1 \\ w_2 \\w_3 \end{bmatrix} =v_1w_1+v_2w_2+\dots+v_nw_n = k \text{ (scalare)} $$

prodotto scalare tra un vettore e un vettore trasposto:

$$ v w^T = \begin{bmatrix} v_1 \\ v_2 \\ v_3 \end{bmatrix} \begin{bmatrix} w_1 & w_2 & w_3 \end{bmatrix}

\begin{bmatrix} v_1 w_1 & v_1 w_2 & v_1 w_3 \\ v_2 w_1 & v_2 w_2 & v_2 w_3 \\ v_3 w_1 & v_3 w_2 & v_3 w_3 \end{bmatrix} = A \text{ (matrice)} $$

Operazioni con le matrici

somma di due matrici:

$$ A + B = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix} + \begin{bmatrix} b_{11} & b_{12} \\ b_{21} & b_{22} \end{bmatrix}

\begin{bmatrix} a_{11} + b_{11} & a_{12} + b_{12} \\ a_{21} + b_{21} & a_{22} + b_{22} \end{bmatrix} \text{ (matrice)} $$

prodotto tra una matrice e un vettore:

$$ A v = \begin{bmatrix} a_{11} & a_{12} \\ a_{21} & a_{22} \end{bmatrix} \begin{bmatrix} v_1 \\ v_2 \end{bmatrix}

\begin{bmatrix} a_{11} v_1 + a_{12} v_2 \\ a_{21} v_1 + a_{22} v_2 \end{bmatrix} \text{ (vettore)} $$