News for hackers. Stuff that matters.
Re:How many floating-point numbers are in the interval [0,1]... by zX41ZdbW on Sunday April 16, 2023 @12:54AM (#35587370)
If you write it as an SQL query in ClickHouse, it will take only 0.170 seconds:

    SELECT sum(reinterpretAsFloat32(number) BETWEEN 0.0 AND 1.0) FROM numbers_mt(0x100000000)

    1 row in set. Elapsed: 0.170 sec. Processed 2.39 billion rows, 19.08 GB (14.02 billion rows/s., 112.13 GB/s.)

There are no comments on this comment yet.