06.07.2013 Views

Unités de calcul flottant - Lirmm

Unités de calcul flottant - Lirmm

Unités de calcul flottant - Lirmm

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

Traitement <strong>de</strong>s cas spéciaux<br />

addition −∞ x ∈ F ∗ − 0 − 0 + x ∈ F ∗ + +∞ NaN<br />

−∞ −∞ −∞ −∞ −∞ −∞ NaN NaN<br />

y ∈ F ∗ − −∞ x + y ou −∞ y y x + y +∞ NaN<br />

0 − −∞ x 0 − 0 + x +∞ NaN<br />

0 + −∞ x 0 + 0 + x +∞ NaN<br />

y ∈ F ∗ + −∞ x + y y y x + y ou +∞ +∞ NaN<br />

+∞ NaN +∞ +∞ +∞ +∞ +∞ NaN<br />

NaN NaN NaN NaN NaN NaN NaN NaN<br />

L’implantation pratique est simple car c’est juste quelques portes<br />

logiques.<br />

A. Tisserand – LIRMM, CNRS-UM2 – ARCHI07 – <strong>Unités</strong> <strong>de</strong> <strong>calcul</strong> <strong>flottant</strong> 101/144<br />

Optimisations<br />

• Séparer les cas “impossibles simultanément”<br />

Exemple : Close/Far Path, si d > 1 alors pas <strong>de</strong> cancellation possible<br />

• Anticiper certaines valeurs<br />

Exemple : Commencer à <strong>calcul</strong>er t en même temps que<br />

l’addition/soustraction <strong>de</strong>s mantisses<br />

R1/L−SH<br />

LOD<br />

t<br />

S: 100%<br />

D: 100%<br />

R1/L−SH<br />

S:150%<br />

D: 70%<br />

• Spéculer sur les résultats les plus probables (latence variable)<br />

LOP<br />

Problème : les optimisations entrainent une augmentation significative <strong>de</strong><br />

la surface<br />

A. Tisserand – LIRMM, CNRS-UM2 – ARCHI07 – <strong>Unités</strong> <strong>de</strong> <strong>calcul</strong> <strong>flottant</strong> 103/144<br />

t<br />

Schéma fonctionnel<br />

e x e y mx my sx sy d<br />

sign<br />

pack<br />

opp<br />

R1/L−SH<br />

ROUND<br />

R−SH<br />

LOD<br />

sign<br />

t<br />

EOP<br />

fp−op<br />

A. Tisserand – LIRMM, CNRS-UM2 – ARCHI07 – <strong>Unités</strong> <strong>de</strong> <strong>calcul</strong> <strong>flottant</strong> 102/144<br />

Multiplication (et extensions)<br />

Décomposition du problème en <strong>de</strong>ux parties :<br />

• multiplication <strong>de</strong>s mantisses<br />

• gestion <strong>de</strong> la virgule (simple)<br />

A. Tisserand – LIRMM, CNRS-UM2 – ARCHI07 – <strong>Unités</strong> <strong>de</strong> <strong>calcul</strong> <strong>flottant</strong> 104/144<br />

SP

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!