Computerarithmetiek
Welke combinatie geeft het aantal betrouwbare decimale significante cijfers van drijvendekommagetallen met enkele en dubbele precisie juist weer?
- AEnkele precisie circa 3 cijfers, dubbele precisie circa 7 cijfers
- BEnkele precisie circa 7 cijfers, dubbele precisie circa 15 tot 16 cijfers
- CEnkele precisie circa 32 cijfers, dubbele precisie circa 64 cijfers
Antwoord en toelichting tonen
Antwoord: B. Enkele precisie circa 7 cijfers, dubbele precisie circa 15 tot 16 cijfers
Het aantal significante cijfers wordt bepaald door de precisie van de mantisse. Enkele precisie heeft 24 bit inclusief de voorste 1; 2²⁴ ≈ 1,7 × 10⁷, dus circa 7 decimale cijfers. Dubbele precisie heeft 53 bit; 2⁵³ ≈ 9 × 10¹⁵, dus circa 15 tot 16 cijfers. Bijvoorbeeld 123456789 wordt in enkele precisie 123456792, waarbij de lagere cijfers niet behouden blijven. 32 en 64 cijfers zijn de fout dat het totale aantal bits als aantal decimale cijfers wordt genomen. Circa 3 cijfers komt overeen met de precisie van halve precisie.