I've got the following polynomial
$$
x^3-6x^2-2x+40
$$
and I want to find its roots. The only option I see at the moment is to compute all the divisors of $40$ and their inverse, and manually check if it's result is $0$. This works, because $4$ is a zero and now we can divide the polynomial by the factor $x-4$, resulting in a second degree polynomial (which is easier to solve).

I was wondering if there's any other method/idea to manually find the roots of this polynomial?


Question: Correlating /var/log/* timestamps
Answer: You can give this a try :

First, get the timestamp of the dmesg file (my assumption is this will be dmesg's time 0).  You'll use ls -l --time-style=+%s

/var/log$ ls -l --time-style=+%s dmesg
-rw-r----- 1 root adm 56181 1294941018 dmesg


You can convert the seconds into a human-readable date with

perl -e 'print scalar localtime(1294941018)' 


So to see a readable event time, add in the seconds from the event in dmesg.  If the dmesg event was 55.290387 seconds in, add 55 or 55.290387 :

perl -e 'print scalar localtime(1294953978 + 55)'


Another way to transform epochal-rooted seconds into readable time is to use date -d as suggested.
If you tell 'date' to represent a time supplied with -d , you can indicate that the time to be converted is in seconds-since-the-epoch by using @ . 

date -d "@1294953978"


This gives you something like "Thu Jan 13 15:26:18 CST 2011" as output.

date +%s will print the current time in the seconds-since-epoch format.

I can't remember how to do shell math, so I typically use the perl method as above. :)