What’s a Double Array?

Print anything with Printful



A double array can refer to an array of floating point numbers or a multidimensional array with two sets of indexes. It can also refer to an array of instantiated classes. Each element in a double array takes up 8 bytes of memory and is the start of another array.

There are two uses for the term “double array”. The first indicates that an array is composed of data elements of the double scalar type, a sort of floating point number. The second usage describes a two-dimensional (2D) or multidimensional array. Multidimensional arrays have more than one index into the data memory locations, meaning that each element within the double array is actually the start of another array. In object-oriented languages, a double array can also mean an array that contains elements of the class double, instead of the scalar type.

Not all computer programming languages ​​have a data type known as a double. In general, however, it is a floating-point representation of a number that takes up twice, or twice, the amount of space a single precision number takes up. These numbers can contain remarkably large values ​​which are usually expressed with exponents. Most computer hardware uses 64 bits to represent a double, which means that a double array will take up 8 bytes of memory for each element, although some hardware uses 128 bits or more for a double precision data type.

Many object-oriented programming languages ​​have wrapper classes for scalar data types, allowing them to be treated like any other class or object. A double array may contain these objects instead, in which case the array will function as an array of instantiated classes. This can sometimes be useful for some network situations where serialization is an issue or in multithreaded applications where synchronization is important.

When referring to a multidimensional array, a double array usually means an array that has two sets of indexes. A one-dimensional array is simply a list of similar data types that are all consecutively aligned in computer memory, with the location of each separate data cell numbered sequentially upwards starting at zero. The number which corresponds to the position of the data within the array is known as the index and the data in the index is called the data item or simply item.

A double array is basically a one-dimensional array where each index is actually the first index of another one-dimensional array. One way to visualize a double array is as a grid or a piece of graph paper. The first index in the array would point to which grid column is being referenced, while the second index would indicate which row within that column is being accessed.




Protect your devices with Threat Protection by NordVPN


Skip to content