mirror of
https://github.com/reddit-archive/reddit.git
synced 2026-04-27 03:00:12 -04:00
Make hot score continuous.
This commit is contained in:
@@ -21,7 +21,7 @@
|
||||
-------------------------------------------------------------------------------
|
||||
|
||||
create or replace function hot(ups integer, downs integer, date timestamp with time zone) returns numeric as $$
|
||||
select round(cast(log(greatest(abs($1 - $2), 1)) + sign($1 - $2) * (date_part('epoch', $3) - 1134028003) / 45000.0 as numeric), 7)
|
||||
select round(cast(log(greatest(abs($1 - $2), 1)) * sign($1 - $2) + (date_part('epoch', $3) - 1134028003) / 45000.0 as numeric), 7)
|
||||
$$ language sql immutable;
|
||||
|
||||
create or replace function score(ups integer, downs integer) returns integer as $$
|
||||
|
||||
Reference in New Issue
Block a user