Question : I’m currently writing unit tests for a stored procedure that calculates the amount of taxes and the tax […]
Tag: floating-point
Storing floating point values for various units of measurement (kg, ml, mm, pl)
Question : I have a table like the following: order_item ———— serial | id (PK) integer | order_id ???? | […]
Rounding issues?
Question : Try this: create table test (f float); insert into test values (330.0); commit; select (8 + 330.0/60)::int; –14 […]
When PostgreSQL query
Question : I’m running a query using PostgreSQL 9.6.6 and when querying: SELECT * FROM table WHERE threshold_value < VALUE […]
Storing floating point values for various units of measurement (kg, ml, mm, pl)
Question : I have a table like the following: order_item ———— serial | id (PK) integer | order_id ???? | […]
Non-deterministic sum of floats
Question : Let me state the obvious fist: I completely understand that floating point types cannot accurately represent decimal values. […]
wrong value when storing big float value
Question : i got a weird problem using mariadb. CREATE DATABASE testdb; USE testdb; CREATE TABLE testing (afloat FLOAT NULL); […]
How to prepare a date and double for a mysql replace statement?
Question : I have a MySql table with three columns: CU VARCHAR(3) DA DATETIME VA DOUBLE I need to execute […]
PostgreSQL and MONEY data type for currency values
Question : For a project, I created a table with a column price MONEY NOT NULL column. And I thought […]
Selecting a floating value yields incorrect results
Question : Consider the following. CREATE TABLE IF NOT EXISTS `docs` ( `id` int(6) unsigned NOT NULL, `qty` float NOT […]
- 1
- 2