Make hot score continuous.

This commit is contained in:
Brian Simpson
2014-01-12 13:04:59 -05:00
parent d8e4156825
commit 50d35de04b
2 changed files with 2 additions and 2 deletions

View File

@@ -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 $$