Something interesting you can do if you use unity is go into unity’s own documentation for shadergraph nodes.
They usually have the actual implementation of the formulas they use, so in this case you can see the code for each of the configurations of the blend node