LST = 100.46 + 0.985647 * d + long + 15*UT
They don't explain what the two constants are (100.46 and 0.985647), could anyone explain what those constants are and how they were calculated in the first place please?
There are three constants there, 100.46, 0.985647, and 15.
The value of 100.46 degrees is the value needed to make the expression yield the correct value for GMST at 0h UT on 1 January 2000. The value of 0.985647 degrees per day is the number of degrees the Earth rotates in one mean solar day, sans a multiple of 360. The value of 15 degrees per hour is the number of degrees the Earth rotates with respect to the mean fictitious Sun every hour.
Regarding 0.985647: There is one extra sidereal day in a solar year than there are solar days. There are 365.2422 solar days in a year, so the Earth rotates $360*366.2422/365.2422=360.985647332$ degrees per solar day with respect to the stars. That first 360 is irrelevant (the result needs to be taken mod 360 in the end), resulting in the factor of 0.985647 (0.985647332 rounded to six significant digits).
Regarding 15: Note that this is the number of degrees the Earth rotates per hour with respect to the Sun. Multiplying this by $366.2422/365.2422$ yields 15.04106864, the number of degrees the Earth rotates per hour with respect to the stars.
Another way to achieve the same result is to fold that extra 0.04106864 degrees per hour into the number of days since noon on 1 January 2000. Not surprisingly, 0.04106864*24 = 0.985647. This means that the $d$ in the approximate formula in the question must include the fractional days.
You need to take care with this approximate formula. It is approximately true for the 200 year period centered around midnight on 1 January 2000, and you need to make sure that the $d$ is the number of days from noon on 1 January 2000, including fractional days.
Addendum: Showing this is the same as the Astronomical Almanac expression, sans a quadratic term
The Astronomical Almanac gives an expression for approximate mean sidereal time, in hours:
$$\mathit{GMST} = 6.697374558 + 0.06570982441908 D_0 + 1.00273790935 H + 0.000026 T^2$$
Where $\mathit{GMST}$ is the mean sidereal time in hours, $H$ is the universal time at the time in question, $D_0$ is the Julian date on the previous midnight of the time in question less 2451545.0, $D$ is the Julian date at the time in question (including fractional days) less 2451545.0, and $T$ is $D/36525$. The relationship between $D_0$, $D$, and $H$ is quite simple: $D_0 = D - H/24$. Substituting this in the above and omitting the quadratic term yields
$$\begin{aligned}
\mathit{GMST} &= 6.697374558 + 0.06570982441908 (D-H/24) + 1.00273790935 H
\\
&= 6.697374558 + 0.06570982441908D + H
\end{aligned}$$
(Strictly speaking, 1.00273790935-0.06570982441908/24 = 0.9999999999992 rather than 1.0, but that's just because that 1.00273790935 should be 1.0027379093508).
Multiplying by 15 yields the GMST in degrees:
$$\mathit{GMST}_{\text{deg}} = 100.4606184 + 0.9856473662862 D + 15 H$$
This is the expression in the question, sans the longitude and plus some extra digits.
0.985647
value might be the conversion from solar to sidereal day. $\endgroup$0.9972695663290843
is the ratio between the solar and sidereal day. I had thought that the100.46
was decimal days from the start of a year until the vernal equinox, but that's about 20 days out too :/ $\endgroup$