[Math] pastebin-like services and logarithmic scale

Couple of pastebin-like services has a file retention period rule, which is calculated like:

FILE RETENTION PERIOD
---------------------

retention = min_age + (-max_age + min_age) * pow((file_size / max_size - 1), 3)

   days
    365 |  \
        |   \
        |    \
        |     \
        |      \
        |       \
        |        ..
        |          \
  197.5 | ----------..-------------------------------------------
        |             ..
        |               \
        |                ..
        |                  ...
        |                     ..
        |                       ...
        |                          ....
        |                              ......
     30 |                                    ....................
          0                      256.0                      512.0
                                                              MiB

( https://0x0.st/ )

Files are kept for a minimum of 3, and a maximum of 100 Days.

How long a file is kept depends on its size. Larger files are deleted earlier 
than small ones. This relation is non-linear and skewed in favour of small 
files.

The exact formula for determining the maximum age for a file is:

MIN_AGE + (MAX_AGE - MIN_AGE) * (1-(FILE_SIZE/MAX_SIZE))^2

( https://x0.at/ )

The graph on first example is more steep, due to cubic function used. The second example is less steep: square function used instead.

I recreated the plot of first example in Wolfram Mathematica (square):

The second example (cubic):

Can you solve this problem without log scale? I don't even know how.

Also, my Wolfram Mathematica notebook in HTML form

And the notebook

(the post first published at 20231031.)


List of my other blog posts.

Subscribe to my news feed

Yes, I know about these lousy Disqus ads. Please use adblocker. I would consider to subscribe to 'pro' version of Disqus if the signal/noise ratio in comments would be good enough.