Data update
This commit is contained in:
parent
4d5544505c
commit
4924dd0264
3073 changed files with 55820 additions and 4408 deletions
16
Task/Test-integerness/DuckDB/test-integerness-2.duckdb
Normal file
16
Task/Test-integerness/DuckDB/test-integerness-2.duckdb
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
create or replace function number_integerp(x) as (
|
||||
x = trunc(x)
|
||||
);
|
||||
|
||||
# Return true iff x has the type signature of a Rational
|
||||
# with the denominator dividing the numerator evenly.
|
||||
create or replace function rational_integerp(x) as (
|
||||
typeof(x) = 'STRUCT(n INTEGER, d INTEGER)'
|
||||
and x.n % x.d = 0
|
||||
);
|
||||
|
||||
# Return true if x can be cast to a Complex with
|
||||
# the imaginary part equal to 0 and an integer real part.
|
||||
create or replace function complex_integerp(x) as (
|
||||
(x::Complex).i = 0 and number_integerp(x.r)
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue