xNull = {0, 0, 0};
sin[{i_, k_, j_}] :=
If[k > 0 && Element[i, Reals] === True, h = N[Sin[i]]; If[Element[h, Reals] === True, {h, k, ToString["Sin(" <> j <> ")"]}, xNull], xNull];
For[i = 1., i <= 1000000., i++, x = sin[{7.5, 3.2, "xNm"}]] // AbsoluteTiming
x
{7.32883, Null}
{0.938, 3.2, "Sin(xNm)"}
How can I optimize this function, I need only draw any real number and if they are not, I must return {0,0,0}
i_ must be a real number with a precision of 16, k_ cheh a decimal number ranging from 0.0 to 9.9 with a careful precision of one decimal number, j_ is a text string