I am not sure if you want to write all decimals or not. I am assuming the first case as the statement says "It works on simple decimal numbers". Thus, be advised you can increase the threshold for representing number in the scientific form by using ScientifcNotationThreshold
in NumberForm
along the numerator of digits and decimals, and along the suggestion of @BobHanlon for a clearer plot:
ClearAll;
f1[a_, b_, c_] := a*x^2 + b*x^3 + c;
f2[a_, b_, c_] := a*x + b*x^2 + (2 - x)*c;
x = Range[0, 10, 0.01];
a1 = 1.0000000000034; b1 = 2.0; c1 = 0.000000001;
f3 = f2[a1, b1, c1] + f1[a1, 1, c1];
plot1 = ListLinePlot[f3,
PlotLabel ->
Row[Style[#, 12, Black, Bold, SingleLetterItalics -> False] & /@
{a ==NumberForm[a1, {18, 17}, ScientificNotationThreshold -> {-25, 25}],
b == b1,
c == NumberForm[c1, {10, 9}, ScientificNotationThreshold -> {-15, 15}]
}, Invisible["spc"]
]
]
Edit
The suggestions by Carl have been added (avoid use of ToString
whenever posible). It is also included a second plot when the label is dangerously long by using Column
with option Aligment-> Left
, instead of Row
.
ListLinePlot
produces a clearer, sharper plot. However,ListPlot
has an advantage if you you want to includeTooltip
. $\endgroup$