¾�ΥС�������ʸ�� �� 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9.6 | 9.5 | 9.4 | 9.3 | 9.2 | 9.1 | 9.0 | 8.4 | 8.3 | 8.2 | 8.1 | 8.0 | 7.4 | 7.3 | 7.2

9.3. ���Ѵؿ��ȱ黻��

PostgreSQL�ο�¿���η����Ф��뻻�ѱ黻�Ҥ��Ѱդ���Ƥ��ޤ��� ���Ƥβ�ǽ�ʱ黻���Ф��ư���Ū�ʻ��ѵ���Τʤ���(�㤨�С�����/����ǡ�����)�ˤĤ��Ƥϡ���³������Ǽºݤ�ư����������ޤ���

ɽ9-2�ˡ����Ѳ�ǽ�ʻ��ѱ黻�Ҥ򼨤��ޤ���

ɽ 9-2. ���ѱ黻��

�黻��̾���������
+ ��2 + 35
- ��2 - 3-1
* ��2 * 36
/ �� (�����γ�껻�Ǥ�;����ڤ�Τ�)4 / 22
% ��; (;��)5 % 41
^ 沾�2.0 ^ 3.08
|/ ʿ����|/ 25.05
||/ ����||/ 27.03
! ����5 !120
!! ���� (���ֱ黻��)!! 5120
@ ������@ -5.05
& �Х��ʥ��AND91 & 1511
| �Х��ʥ�� OR32 | 335
# �Х��ʥ�� XOR17 # 520
~ �Х��ʥ�� NOT~1-2
<< �Х��ʥ�κ����ե�1 << 416
>> �Х��ʥ�α����ե�8 >> 22

�ӥåȱ黻�Ҥ������ǡ������Τߤ˻��ѤǤ��ޤ��� ����¾�α黻�Ҥ����Ƥο��ͥǡ������˻��ѤǤ��ޤ��� �ޤ����ӥåȱ黻�Ҥ�ɽ9-10�˼�����bit��bit varying�ӥå�ʸ���󷿤��Ф��Ƥ���Ѥ��뤳�Ȥ��Ǥ��ޤ���

ɽ9-3�˻��Ѳ�ǽ�ʻ��Ѵؿ��򼨤��ޤ��� ����ɽ���dp�ϡ�double precision���̣���ޤ��� �����ؿ���¿���ϡ��ۤʤ�����������ʣ���η����󶡤���Ƥ��ޤ��� ���̤ʾ������������Ǥ�շ����δؿ��Ϥ��ΰ�����Ʊ���ǡ��������֤��ޤ��� double precision�ǡ������Ф���ؿ��ΤۤȤ�ɤϥۥ��ȥ����ƥ��C�饤�֥��ξ��ؤ˼�������Ƥ��ޤ��� ���Τ��ᡢ�����᤯�ξ������٤ȿ���ϥۥ��ȥ����ƥ�˰�¸�����Ѥ��ޤ���

ɽ 9-3. ���Ѵؿ�

�ؿ�����ͷ����������
abs(x)(x ��Ʊ��)������abs(-17.4)17.4
cbrt(dp)dp����cbrt(27.0)3
ceil(dp or numeric)(���Ϸ���Ʊ��)������꾮�����ʤ��Ǿ�������ceil(-42.8)-42
ceiling(dp or numeric)(���Ϸ���Ʊ��)������꾮�����ʤ��Ǿ�������(ceil����̾)ceiling(-95.3)-95
degrees(dp)dp�饸������б�������degrees(0.5)28.6478897565412
exp(dp or numeric)(���Ϸ���Ʊ��)�ؿ�exp(1.0)2.71828182845905
floor(dp or numeric)(���Ϸ���Ʊ��)��������礭���ʤ����������floor(-42.8)-43
ln(dp or numeric)(���Ϸ���Ʊ��)�����п�ln(2.0)0.693147180559945
log(dp or numeric)(���Ϸ���Ʊ��)10 ����Ȥ����п�(�����п�)log(100.0)2
log(b numeric, x numeric)numericb����Ȥ����п�log(2.0, 64.0)6.0000000000
mod(y, x)(�����η���Ʊ��)y/x �ξ�;mod(9,4)1
pi()dp"�߼�Ψ(��)" ���pi()3.14159265358979
power(a dp, b dp)dpa��b��power(9.0, 3.0)729
power(a numeric, b numeric)numerica��b��power(9.0, 3.0)729
radians(dp)dp�٤��б�����饸����radians(45.0)0.785398163397448
random()dp0.0��1.0�������random() 
round(dp or numeric)(���Ϸ���Ʊ��)�ͼθ���round(42.4)42
round(v numeric, s integer)numerics�η�ǻͼθ���round(42.4382, 2)42.44
setseed(dp)integer���random()�ƤӽФ��ǻ��Ѥ���������setseed(0.54823)1177314959
sign(dp or numeric)(���Ϸ���Ʊ��)���������(-1, 0, +1)sign(-8.4)-1
sqrt(dp or numeric)(���Ϸ���Ʊ��)ʿ����sqrt(2.0)1.4142135623731
trunc(dp or numeric)(���Ϸ���Ʊ��)�ڼΤ�trunc(42.8)42
trunc(v numeric, s integer)numerics�η���ڼΤ�trunc(42.4382, 2)42.43
width_bucket(op numeric, b1 numeric, b2 numeric, count integer)integeroperand��������Ƥ��롢���b1������b2���Х��Ŀ�count�������٥ҥ��ȥ����ΥХ��Ĥ��֤��ޤ��� width_bucket(5.35, 0.024, 10.06, 5)3

�Ǹ�ˡ����Ѳ�ǽ�ʻ��Ѵؿ���ɽ9-4�˼����ޤ��� ���Ƥλ��Ѵؿ���double precision�ǡ������ΰ���������ͤ���ޤ���

ɽ 9-4. ���Ѵؿ�

�ؿ�����
acos(x)��;���ؿ�
asin(x)�������ؿ�
atan(x)�����ܴؿ�
atan2(x, y)x/y�ε����ܴؿ�
cos(x);���ؿ�
cot(x);�ܴؿ�
sin(x)�����ؿ�
tan(x)���ܴؿ�