automatically swap values if needed to create a uniform
<quote>lower left — upper right</quote> internal representation.
When the corners coincide, <type>cube</type> stores only one corner
along with an <quote>is point</quote> flag to avoid wasting space.
</para>
<para>
White space is ignored on input, so
<literal>[(<replaceable>x</replaceable>),(<replaceable>y</replaceable>)]</literal> is the same as
<literal>[ ( <replaceable>x</replaceable> ), ( <replaceable>y</replaceable> ) ]</literal>.
</para>
</sect2>
<sect2 id="cube-precision">
<title>Precision</title>
<para>
Values are stored internally as 64-bit floating point numbers. This means
that numbers with more than about 16 significant digits will be truncated.
</para>
</sect2>
<sect2 id="cube-usage">
<title>Usage</title>
<para>
<xref linkend="cube-operators-table"/> shows the specialized operators
provided for type <type>cube</type>.
</para>
<table id="cube-operators-table">
<title>Cube Operators</title>
<tgroup cols="1">
<thead>
<row>
<entry role="func_table_entry"><para role="func_signature">
Operator
</para>
<para>
Description
</para></entry>
</row>
</thead>
<tbody>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>cube</type> <literal>&&</literal> <type>cube</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Do the cubes overlap?
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>cube</type> <literal>@></literal> <type>cube</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Does the first cube contain the second?
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>cube</type> <literal><@</literal> <type>cube</type>
<returnvalue>boolean</returnvalue>
</para>
<para>
Is the first cube contained in the second?
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>cube</type> <literal>-></literal> <type>integer</type>
<returnvalue>float8</returnvalue>
</para>
<para>
Extracts the <parameter>n</parameter>-th coordinate of the cube
(counting from 1).
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>cube</type> <literal>~></literal> <type>integer</type>
<returnvalue>float8</returnvalue>
</para>
<para>
Extracts the <parameter>n</parameter>-th coordinate of the cube,
counting in the following way: <parameter>n</parameter> = 2
* <parameter>k</parameter> - 1 means lower bound
of <parameter>k</parameter>-th dimension, <parameter>n</parameter> = 2
* <parameter>k</parameter> means upper bound of
<parameter>k</parameter>-th dimension. Negative
<parameter>n</parameter> denotes the inverse value of the corresponding
positive coordinate. This operator is designed for KNN-GiST support.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>cube</type> <literal><-></literal> <type>cube</type>
<returnvalue>float8</returnvalue>
</para>
<para>
Computes the Euclidean distance between the two cubes.
</para></entry>
</row>
<row>
<entry role="func_table_entry"><para role="func_signature">
<type>cube</type> <literal><#></literal> <type>cube</type>
<returnvalue>float8</returnvalue>
</para>
<para>
Computes the taxicab (L-1 metric) distance between the two cubes.
</para></entry>