|
650 | 650 | <indexterm>
|
651 | 651 | <primary>radians</primary>
|
652 | 652 | </indexterm>
|
653 |
| - <indexterm> |
654 |
| - <primary>random</primary> |
655 |
| - </indexterm> |
656 | 653 | <indexterm>
|
657 | 654 | <primary>round</primary>
|
658 | 655 | </indexterm>
|
659 |
| - <indexterm> |
660 |
| - <primary>setseed</primary> |
661 |
| - </indexterm> |
662 | 656 | <indexterm>
|
663 | 657 | <primary>sign</primary>
|
664 | 658 | </indexterm>
|
|
819 | 813 | <entry><literal>0.785398163397448</literal></entry>
|
820 | 814 | </row>
|
821 | 815 |
|
822 |
| - <row> |
823 |
| - <entry><literal><function>random()</function></literal></entry> |
824 |
| - <entry><type>dp</type></entry> |
825 |
| - <entry>random value in the range 0.0 <= x < 1.0</entry> |
826 |
| - <entry><literal>random()</literal></entry> |
827 |
| - <entry></entry> |
828 |
| - </row> |
829 |
| - |
830 | 816 | <row>
|
831 | 817 | <entry><literal><function>round(<type>dp</type> or <type>numeric</type>)</function></literal></entry>
|
832 | 818 | <entry>(same as input)</entry>
|
|
843 | 829 | <entry><literal>42.44</literal></entry>
|
844 | 830 | </row>
|
845 | 831 |
|
846 |
| - <row> |
847 |
| - <entry><literal><function>setseed(<type>dp</type>)</function></literal></entry> |
848 |
| - <entry><type>void</type></entry> |
849 |
| - <entry>set seed for subsequent <literal>random()</literal> calls (value between -1.0 and |
850 |
| - 1.0, inclusive)</entry> |
851 |
| - <entry><literal>setseed(0.54823)</literal></entry> |
852 |
| - <entry></entry> |
853 |
| - </row> |
854 |
| - |
855 | 832 | <row>
|
856 | 833 | <entry><literal><function>sign(<type>dp</type> or <type>numeric</type>)</function></literal></entry>
|
857 | 834 | <entry>(same as input)</entry>
|
|
907 | 884 | </tgroup>
|
908 | 885 | </table>
|
909 | 886 |
|
| 887 | + <para> |
| 888 | + <xref linkend="functions-math-random-table"> shows functions for |
| 889 | + generating random numbers. |
| 890 | + </para> |
| 891 | + |
| 892 | + <table id="functions-math-random-table"> |
| 893 | + <title>Random Functions</title> |
| 894 | + |
| 895 | + <tgroup cols="3"> |
| 896 | + <thead> |
| 897 | + <row> |
| 898 | + <entry>Function</entry> |
| 899 | + <entry>Return Type</entry> |
| 900 | + <entry>Description</entry> |
| 901 | + </row> |
| 902 | + </thead> |
| 903 | + <tbody> |
| 904 | + <row> |
| 905 | + <entry> |
| 906 | + <indexterm> |
| 907 | + <primary>random</primary> |
| 908 | + </indexterm> |
| 909 | + <literal><function>random()</function></literal> |
| 910 | + </entry> |
| 911 | + <entry><type>dp</type></entry> |
| 912 | + <entry>random value in the range 0.0 <= x < 1.0</entry> |
| 913 | + </row> |
| 914 | + |
| 915 | + <row> |
| 916 | + <entry> |
| 917 | + <indexterm> |
| 918 | + <primary>setseed</primary> |
| 919 | + </indexterm> |
| 920 | + <literal><function>setseed(<type>dp</type>)</function></literal> |
| 921 | + </entry> |
| 922 | + <entry><type>void</type></entry> |
| 923 | + <entry>set seed for subsequent <literal>random()</literal> calls (value between -1.0 and |
| 924 | + 1.0, inclusive)</entry> |
| 925 | + </row> |
| 926 | + </tbody> |
| 927 | + </tgroup> |
| 928 | + </table> |
| 929 | + |
| 930 | + <para> |
| 931 | + The characteristics of the values returned by |
| 932 | + <literal><function>random()</function></literal> depend |
| 933 | + on the system implementation. It is not suitable for cryptographic |
| 934 | + applications; see <xref linkend="pgcrypto"> module for an alternative. |
| 935 | + </para> |
| 936 | + |
910 | 937 | <para>
|
911 | 938 | Finally, <xref linkend="functions-math-trig-table"> shows the
|
912 | 939 | available trigonometric functions. All trigonometric functions
|
|