I wrote a little training code (I was interested in poking around myself) which turns out the insides of the floating number.
The output at f == 0.5 + 1/(2^24). 1/(2^24) is the youngest digit of the mantissa at a given degree:
What exactly did you want to see there? Float numbers have one bit per sign, 8 bits per exponent, and the remaining 23 are mantissa, i.e. the maximum precision is 23 decimal places in binary representation, or 7 decimal places. For double numbers, there is 1 bit per sign, 11 bits per exponent, the remaining 52 bits are mantissa, maximum precision is 52 decimal places in binary representation or 16 decimal places. Why is there a code for this?
What exactly did you want to see there? Float numbers have one bit per sign, 8 bits per exponent, the remaining 23 are mantissa, i.e. the maximum accuracy of 23 decimal places in binary representation, or 7 decimal places. For double numbers, there is 1 bit per sign, 11 bits per exponent, the remaining 52 bits are mantissa, maximum precision is 52 decimal places in binary representation or 16 decimal places. Why is there a code for this?
"Theory without practice is dead and fruitless, practice without theory is useless and pernicious." And all sorts of interesting things with floating numbers abound:
pavlick_: "Theory without practice is dead and fruitless, practice without theory is useless and detrimental." And there's all sorts of interesting stuff with floating numbers:
I just thought that maybe you were expecting something unique in MKL.
And the whole mantissa overflow thing is interesting. For first grade. )
pavlick_: Of course, tell me, most programmers are not up to speed on the subject, I have some gaps myself.
Well, I don't know, we were trained in binary arithmetic so that it stuck in our heads for life. ) Another thing is that not all of us are programmers. In general, you do not think that my question is some kind of stone in your garden, I just thought that the purpose of your program - to see some differences in the MCL from the standard, so I asked.
I wrote a little training code (I was interested in poking around myself) which turns out the insides of the floating number.
The output at f == 0.5 + 1/(2^24). 1/(2^24) is the youngest digit of the mantissa at a given degree:
What exactly did you want to see there? Float numbers have one bit per sign, 8 bits per exponent, and the remaining 23 are mantissa, i.e. the maximum precision is 23 decimal places in binary representation, or 7 decimal places. For double numbers, there is 1 bit per sign, 11 bits per exponent, the remaining 52 bits are mantissa, maximum precision is 52 decimal places in binary representation or 16 decimal places. Why is there a code for this?
What exactly did you want to see there? Float numbers have one bit per sign, 8 bits per exponent, the remaining 23 are mantissa, i.e. the maximum accuracy of 23 decimal places in binary representation, or 7 decimal places. For double numbers, there is 1 bit per sign, 11 bits per exponent, the remaining 52 bits are mantissa, maximum precision is 52 decimal places in binary representation or 16 decimal places. Why is there a code for this?
"Theory without practice is dead and fruitless, practice without theory is useless and detrimental." And there's all sorts of interesting stuff with floating numbers:
I just thought that maybe you were expecting something unique in MKL.
And the whole mantissa overflow thing is interesting. For first grade. )
Of course, tell me, most programmers are not up to speed on the subject, I have some gaps myself.