The following arbitrary-precision computations, in which arbitrary precision is applied early (to the inputs), both work as expected:
Exp[-I*Pi*x]*BesselK[-1, 2.43`20 I*x] /. x -> I*290
Precision@%
$-1.9774702657848900\times 10^{88}-2.4563516704146749\times 10^{700} I$
$17.1508$
Exp[-I*Pi*x]*BesselK[-1, 243/100 I*x] /. x -> I*290.`20
Precision@%
$-1.9774702657848900\times 10^{88}-2.4563516704146749\times 10^{700} I$
$16.7911$
But if I instead use only exact numbers, and convert to 20 digits of arbitrary precision at the end, I get an incorrect result for the real portion, along with an error message for the real portion, saying "no significant digits are available to display". At the same time, it erroneously reports that the result has a Precision of 20 (for complex numbers, MMA's standard behavior is to report a precision equal to that of whichever component has the lower precision):
N[Exp[-I*Pi*x]*BesselK[-1, 243/100*I*x] /. x -> I*290, 20]
Precision@%
$0.\times 10^{88}-2.4563516704146748709\times 10^{700} I$
$20.1505$
The same thing happens up to N[...., 99]. Only by increasing to N[....,100] do I get a proper result:
N[Exp[-I*Pi*x]*BesselK[-1, 243/100*I*x] /. x -> I*290, 100];
NumberForm[%, 17]
Precision@%%
$-1.9774702657848900\times 10^{88}-\left(2.4563516704146749\times 10^{700}\right) i$
$100.$
Why is this?
I ask because this is the opposite of the behavior I generally see—namely that, to achieve a certain final precision, one needs to apply higher arbitrary precision conversions to exact inputs than to exact results, because of precision losses during calculations. Compare, for instance,
Sin[10^30`20]
Precision@%
$0.$
$0.$
versus:
N[Sin[10^30], 20]
Precision@%
$-0.090116901912138058030$
$20.$
Here, the latter result is correct. In the former case, one needs to increase the input precision to 34 to avoid an error. In both of the above cases, Precision@% is reporting the correct value.
FunctionExpand
to get a more numerically stable form:Exp[-I*Pi*x]*BesselK[-1, 243/100*I*x] /. x -> I*290 // FunctionExpand // N[#, 20] &
$\endgroup$