Lineare Algebra (42003-42004)

Gleitkommazahlen-Systeme:
Von der Dezimalen Gleitkomma-Darstellung
zu der 32-Bit und 64-Bit Hexadezimalen- und Binären-Darstellung

 
float
size:32bit
Zahlendarstellung [(-1)n] [1, Matisse] [*2Exponent-127 | 7F]
| VZ | Exponent | Matisse |

Matisse = 23bit GS( von 0 bis 8388607)
Exponent = 8bit GS( von -127 bis 128)
Vorzeichen = 1bit GS(1=(+) und 0=(-))
Gesamt = 32bit

double
size:64bit
Zahlendarstellung [(-1)n] [1, Matisse] [*2Exponent-1023 | 3FF]
| VZ | Exponent | Matisse |

Matisse = 52bit GS( von 0 bis 4503599627370496)
Exponent = 11bit GS( von -1023 bis 1025)
Vorzeichen = 1bit GS(1=(+) und 0=(-))
Gesamt = 64bit

Beispiele:
1)Dez 0,1 to float
0,1=0x0,19 = bis 1,0 verschieben 1,9 * 16-1=f1,9 *2-4  = 123-127=-4

Dez123=0x7B | 0111 1011
VZ = (-1)vz= 0
Exponent = 0111 1011
Matisse = 1001 1001 1001 1001 1001 100

0011 1101 1100 1100 1100 1100 1100 1100
VZ Exponent Matisse

Hex-Dump
3DCCCCCC

2)Dez 0,1 to double
Dez 0,1 =0x0,19=1,1001*2-4= 1019-1023=-4

Dez1019 =0x3FB | 0011 1111 1011
VZ=0
Exponent=011 1111 1011
Mantisse= 1001 ...13mal ... 1001

Hex-Dump
3FB9999999999999 =0x3FB9999999999999

zur übung
0,2 toFloat
0,2 toDouble


antwort = 3FC9999999999999 Big Endion
antwort =  999999999999C93F Little Endion

Dezimaldarstellung zu IEEE-754 Big-Endian-Format

IEEE-754 zu Dezimaldarstellung