Back to Article

A Problem of Accuracy of Computer Calculations

Universal Journal of Computer Sciences and Communications | Vol 1, Issue 1

Figure 1

Program codes in the C++ programming language for checking of the fulfilment the distributive law: <b>(a)</b> for numbers 0,987, 0,278, and 1,268 in <i>double</i> format; <b>(b) </b>for numbers 0,9871, 0,2781, and 1,268 in <i>float</i> format
Figure 1. Program codes in the C++ programming language for checking of the fulfilment the distributive law: (a) for numbers 0,987, 0,278, and 1,268 in double format; (b) for numbers 0,9871, 0,2781, and 1,268 in float format