I have:
LogLinearPlot[ f1[bg] - f2[bg], {bg, 100, 10000000}]
and I get:
Power::infy: Infinite expression 1/0. encountered. >>
Power::infy: Infinite expression 1/Sqrt[0.] encountered. >>
Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered. >>
Power::infy: Infinite expression 1/0.^2 encountered. >>
General::stop: Further output of Power::infy will be suppressed during this calculation. >>
Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered. >>
Infinity::indet: Indeterminate expression 0. ComplexInfinity encountered. >>
General::stop: Further output of Infinity::indet will be suppressed during this calculation. >>
If I use simple Plot, it does not occur. I have been trying to find the error in my code, but Mathematica does not give a clue where to look for it (the supporting functions called from those above take about 500 lines of code). Also, it is worth noting that Mathematica plots the graph in the end. I tried standard debugging inserting prints to the most likely places where zero division could happen but I could never catch the error. It is also interesting that if I plot a wider range ({bg, 1, 10000000}) the error never occurs.
How can I find out where the problem is or what is going on (at this moment I am starting to thing that the problem is LogLinearPlot itself)?
Thank you.