ClickHouse/tests/queries/0_stateless/00541_kahan_sum.sql

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

5 lines
312 B
MySQL
Raw Normal View History

SELECT sum(1) FROM (SELECT * FROM system.numbers LIMIT 1000);
SELECT sumWithOverflow(1) FROM (SELECT * FROM system.numbers LIMIT 1000);
SELECT sumKahan(1e100) - 1e100 * 1000 FROM (SELECT * FROM system.numbers LIMIT 1000);
SELECT abs(sum(1e100) - 1e100 * 1000) > 1 FROM (SELECT * FROM system.numbers LIMIT 1000);