add test for gcd and modulo functions

This commit is contained in:
Maks Skorokhod 2017-11-24 11:17:17 +03:00
parent a665d4c723
commit 66bbc737d4
No known key found for this signature in database
GPG Key ID: 23233B8320707983
4 changed files with 32 additions and 0 deletions

View File

@ -8,6 +8,9 @@
1 1
2147483647 2147483647
1 1
5
255
1
5120 5120
121 121
256 256

View File

@ -9,6 +9,9 @@ select gcd(255, 254);
select gcd(2147483647, 2147483646); select gcd(2147483647, 2147483646);
select gcd(4611686011984936962, 2147483647); select gcd(4611686011984936962, 2147483647);
select gcd(-2147483648, 1); select gcd(-2147483648, 1);
select gcd(255, 515);
select gcd(255, 510);
select gcd(255, 512);
-- test lcm -- test lcm
select lcm(1280, 1024); select lcm(1280, 1024);
select lcm(11, 121); select lcm(11, 121);

View File

@ -0,0 +1,13 @@
8
1
255
255
255
0
127
0
-1
57
3
20
16

View File

@ -0,0 +1,13 @@
SELECT 1000 % 32;
SELECT 7 % 3;
SELECT 255 % 510;
SELECT 255 % 512;
SELECT 255 % 1000000009;
SELECT 0 % 255;
SELECT 2147483647 % 255;
SELECT -1 % -1;
SELECT -1 % -2;
SELECT 255 % 99;
SELECT 42 % 13;
SELECT 42 % 22;
SELECT 1234567 % 123;