1
0
Fork 0
mirror of https://github.com/notwa/rc synced 2024-11-05 00:29:02 -08:00

fix retention equation (just the comment)

This commit is contained in:
Connor Olding 2021-09-16 14:28:23 -07:00
parent 88d6a18653
commit 43813a2cd8

2
sh/oxo
View file

@ -71,7 +71,7 @@ oxo() { ### @-
fi
# compute retention using (fixed point) integers only.
# retention = (365 - 30) * ([file size] / [512 MiB] - 1)**3 + 30
# retention = 30 - (365 - 30) * ([file size] / [512 MiB] - 1)**3
local a=$(( kib/16+1 ))
local b=$(( (kib+64)/128-12288 ))
local c=$(( a*a/16384 ))