In answering a question about double[,]
, I added a screenshot of LINQPad's output for that data structure:
However, I got to wondering what a double[,,]
looks like, and LINQPad won't visualize it for me. Additionally, I don't understand the format of the data which goes into it:
int[,,] foo = new int[,,] { { { 2, 3}, { 3, 4} }, { { 3, 4}, { 1, 5} } };
Can anyone visualize this for me?
The doubles are represented in the form mantissa * 2^exponent , i.e. some of the bits are used for the non-integer part of the double number. The part in the fraction can also used to represent an integer by using an exponent which removes all the digits after the dot. E.g. 2,9979 · 10^4 = 29979.
Double has almost twice the precision as float and is used to store decimal numbers with more digits. It has a 32-bit floating-point precision according to IEEE. It has a 64-bit floating-point precision according to IEEE. It stores up to 7 decimal points and rounds off the rest of the digits.
A double type variable is a 64-bit floating data type A double type can represent fractional as well as whole values. It can contain up to 15 digits in total, including those before and after the decimal point.
You can think of this has having a set of tables stacked on top of each other. So you would need to specify a triplet to retrieve the item, which would specify which table, column, and row to get the value from.
Here's what a 3x3x3 array can be visualized as:
It's a Rectangular Cuboid.
It's a three dimensional solid with 6 faces, all being rectangles.
You can further imagine that cuboid being broken up into a number of cubes, and each of those cubes having a single value.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With