Results of 1 - 10 of about 39 for Float (0.006 sec.)
- Array Functions 15599
- All LIST functions work with the ARRAY data type . Additionally, several ARRAY -native functions are also supported. Array-Native Functions Function Description array_cosine_distance(array1, array2) Computes the cosine distance between two
...can have any size as long as the size is the same for both arguments. | | Example | array_cosine_distance(array_value(1.0::FLOAT, 2.0::FLOAT, 3.0::FLOAT), array_value(2.0::FLOAT, 3.0::FLOAT, 4.0::FLOAT)) | | Result | 0.007416606 | array_cosine_similar...n have any size as long as the size is the same for both arguments. | | Example | array_cosine_similarity(array_value(1.0::FLOAT, 2.0::FLOAT, 3.0::FLOAT), array_value(2.0::FLOAT, 3.0::FLOAT, 4.0::FLOAT)) | | Result | 0.9925834 | array_cross_product(ar...ss product of two arrays of size 3. The array elements cannot be NULL . | | Example | array_cross_product(array_value(1.0::FLOAT, 2.0::FLOAT, 3.0::FLOAT), array_value(2.0::FLOAT, 3.0::FLOAT, 4.0::FLOAT)) | | Result | [-1.0, 2.0, -1.0] | array_distance... - https://man.mtool.work/duckdb/2.0/sql/functions/array.html
- Array Type 10353
- An ARRAY column stores fixed-sized arrays. All fields in the column must have the same length and the same underlying type. Arrays are typically used to store arrays of numbers, but can contain any uniform data type, including ARRAY , LIST
...-native functions are also supported. See the ARRAY functions . Examples Create sample data: CREATE TABLE x (i INTEGER, v FLOAT[3]); CREATE TABLE y (i INTEGER, v FLOAT[3]); INSERT INTO x VALUES (1, array_value(1.0::FLOAT, 2.0::FLOAT, 3.0::FLOAT)); IN...SERT INTO y VALUES (1, array_value(2.0::FLOAT, 3.0::FLOAT, 4.0::FLOAT)); Compute cross product: SELECT array_cross_product(x.v, y.v) FROM x, y WHERE x.i = y.i; Compute... - https://man.mtool.work/duckdb/2.0/sql/data_types/array.html
- Vector Similarity Search Extension 9977
- The vss extension is an experimental extension for DuckDB that adds indexing support to accelerate vector similarity search queries using DuckDB's new fixed-size ARRAY type. See the announcement blog post and the “What's New in the Vector S
...he CREATE INDEX statement with the USING HNSW clause. For example: INSTALL AND LOAD vss; CREATE TABLE my_vector_table (vec FLOAT[3]); INSERT INTO my_vector_table SELECT array_value(a, b, c) FROM range(1, 10) ra(a), range(1, 10) rb(b), range(1, 10) rc(...ant vector, followed by a LIMIT clause. For example: SELECT * FROM my_vector_table ORDER BY array_distance(vec, [1, 2, 3]::FLOAT[3]) LIMIT 3; Additionally, the overloaded min_by(col, arg, n) can also be accelerated with the HNSW index if the arg argum...o get the top 3 rows with the closest vectors to [1, 2, 3] : SELECT min_by(my_vector_table, array_distance(vec, [1, 2, 3]::FLOAT[3]), 3 ORDER BY vec) AS result FROM my_vector_table; [{'vec': [1.0, 2.0, 3.0]}, {'vec': [2.0, 2.0, 3.0]}, {'vec': [1.0, 2.... - https://man.mtool.work/duckdb/2.0/core_extensions/vss.html
- Numeric Types 9601
- Fixed-Width Integer Types The types TINYINT , SMALLINT , INTEGER , BIGINT and HUGEINT store whole numbers, that is, numbers without fractional components, of various ranges. Attempts to store values outside of the allowed range will result
...fixed-point decimals does not typically produce numbers with finite decimal expansion. Therefore, DuckDB uses approximate floating-point arithmetic for all divisions that involve fixed-point decimals and accordingly returns floating-point data types....is therefore recommended to stick with a WIDTH of 18 or below, unless there is a good reason for why this is insufficient. Floating-Point Types The data types FLOAT and DOUBLE precision are variable-precision numeric types. In practice, these types ar...e usually implementations of IEEE Standard 754 for Binary Floating-Point Arithmetic (single and double precision, respectively), to the extent that the underlying processor, operating sy... - https://man.mtool.work/duckdb/2.0/sql/data_types/numeric.html
- Values 9209
- The value class represents a single value of any type. API Reference Overview void duckdb_destroy_value ( duckdb_value * value ); duckdb_value duckdb_create_varchar ( const char * text ); duckdb_value duckdb_create_varchar_length ( const ch
...te_bignum ( duckdb_bignum input ); duckdb_value duckdb_create_decimal ( duckdb_decimal input ); duckdb_value duckdb_create_float ( float input ); duckdb_value duckdb_create_double ( double input ); duckdb_value duckdb_create_date ( duckdb_date input )...value val ); duckdb_bignum duckdb_get_bignum ( duckdb_value val ); duckdb_decimal duckdb_get_decimal ( duckdb_value val ); float duckdb_get_float ( duckdb_value val ); double duckdb_get_double ( duckdb_value val ); duckdb_date duckdb_get_date ( duckdb...input : The duckdb_decimal value Return Value The value. This must be destroyed with duckdb_destroy_value . duckdb_create_float Creates a value from a float Syntax duckdb_value duckdb_create_float ( float input ); Parameters input : The float value R... - https://man.mtool.work/duckdb/2.0/clients/c/value.html
- PHP Client 8943
- The DuckDB PHP client is a tertiary client and is maintained by a third-party. Client API for PHP, focused on performance. The DuckDB PHP client uses the official C API internally through FFI , achieving good benchmark results. This library
...::create('duck.db'); // or DuckDB::create() for in-memory database $duckDB->query('CREATE TABLE test (i INTEGER, b BOOL, f FLOAT);'); $duckDB->query('INSERT INTO test VALUES (3, true, 1.1), (5, true, 1.2), (3, false, 1.1), (3, null, 1.2);'); $duckDB->...ters to our query. Prepared Statements $duckDB = DuckDB::create(); $duckDB->query('CREATE TABLE test (i INTEGER, b BOOL, f FLOAT);'); $duckDB->query('INSERT INTO test VALUES (3, true, 1.1), (5, true, 1.2), (3, false, 1.1), (3, null, 1.2);'); $boolPrep...MALLINT int DUCKDB_TYPE_UINTEGER UINTEGER int DUCKDB_TYPE_UBIGINT UBIGINT Saturio\DuckDB\Type\Math\LongInteger DUCKDB_TYPE_FLOAT FLOAT float DUCKDB_TYPE_DOUBLE DOUBLE float DUCKDB_TYPE_TIMESTAMP TIMESTAMP Saturio\DuckDB\Type\Timestamp DUCKDB_TYPE_DATE... - https://man.mtool.work/duckdb/2.0/clients/tertiary_clients/php.html
- PostgreSQL Compatibility 8896
- DuckDB's SQL dialect closely follows the conventions of the PostgreSQL dialect. The few exceptions to this are listed on this page. Floating-Point Arithmetic DuckDB and PostgreSQL handle floating-point arithmetic differently for division by
...zero. DuckDB conforms to the IEEE Standard for Floating-Point Arithmetic (IEEE 754) for both division by zero and operations involving infinity values. PostgreSQL returns an e...s, run the following SQL queries: SELECT 1.0 / 0.0 AS x; SELECT 0.0 / 0.0 AS x; SELECT -1.0 / 0.0 AS x; SELECT 'Infinity'::FLOAT / 'Infinity'::FLOAT AS x; SELECT 1.0 / 'Infinity'::FLOAT AS x; SELECT 'Infinity'::FLOAT - 'Infinity'::FLOAT AS x; SELECT '...Infinity'::FLOAT - 1.0 AS x; Expression PostgreSQL DuckDB IEEE 754 1.0 / 0.0 error Infinity Infinity 0.0 / 0.0 error NaN NaN -1.0 / 0.0 err... - https://man.mtool.work/duckdb/2.0/sql/dialect/postgresql_compatibility.html
- Complete API 8786
- This page contains the reference for DuckDB's C API. The reference contains several deprecation notices. These concern methods whose long-term availability is not guaranteed as they may be removed in the future. That said, DuckDB's develope
...esult * result , idx_t col , idx_t row ); uint64_t duckdb_value_uint64 ( duckdb_result * result , idx_t col , idx_t row ); float duckdb_value_float ( duckdb_result * result , idx_t col , idx_t row ); double duckdb_value_double ( duckdb_result * result...db_bind_uint64 ( duckdb_prepared_statement prepared_statement , idx_t param_idx , uint64_t val ); duckdb_state duckdb_bind_float ( duckdb_prepared_statement prepared_statement , idx_t param_idx , float val ); duckdb_state duckdb_bind_double ( duckdb_p...te_bignum ( duckdb_bignum input ); duckdb_value duckdb_create_decimal ( duckdb_decimal input ); duckdb_value duckdb_create_float ( float input ); duckdb_value duckdb_create_double ( double input ); duckdb_value duckdb_create_date ( duckdb_date input )... - https://man.mtool.work/duckdb/2.0/clients/c/api.html
- Appender 7909
- Appenders are the most efficient way of loading data into DuckDB from within the C interface, and are recommended for fast data loading. The appender is much faster than using prepared statements or individual INSERT INTO statements. Append
...ue ); duckdb_state duckdb_append_uhugeint ( duckdb_appender appender , duckdb_uhugeint value ); duckdb_state duckdb_append_float ( duckdb_appender appender , float value ); duckdb_state duckdb_append_double ( duckdb_appender appender , double value );...e appender. Syntax duckdb_state duckdb_append_uhugeint ( duckdb_appender appender , duckdb_uhugeint value ); duckdb_append_float Append a float value to the appender. Syntax duckdb_state duckdb_append_float ( duckdb_appender appender , float value );... - https://man.mtool.work/duckdb/2.0/clients/c/appender.html
- Numeric Functions 7909
- Numeric Operators The table below shows the available mathematical operators for numeric types . Operator Description Example Result + Addition 2 + 3 5 - Subtraction 2 - 3 -1 * Multiplication 2 * 3 6 / Float division 5 / 2 2.5 // Division 5
...d Modulo Operators There are two division operators: / and // . They are equivalent when at least one of the operands is a FLOAT or a DOUBLE . When both operands are integers, / performs floating points division ( 5 / 2 = 2.5 ) while // performs integ...the greatest common divisor of x and y . greatest(x1, x2, ...) Selects the largest value. isfinite(x) Returns true if the floating point value is finite, false otherwise. isinf(x) Returns true if the floating point value is infinite, false otherwise....isnan(x) Returns true if the floating point value is not a number, false otherwise. lcm(x, y) Computes the least common multiple of x and y . least_common_mu... - https://man.mtool.work/duckdb/2.0/sql/functions/numeric.html
DuckDB 2.0 Documentation / man.mtool.work