# Product of large number with a very small number returns zero because Mathematica sets the very small number equal to zero [closed]

I have a product Exp[-I*Pi*x]*BesselK[-1, 2.43*Ix]. Now, Exp[-I*Pi*x] grows larger and larger as $x$ increases for imaginary large values, while BesselK[-1, 2.43*Ix] decreases. At a particular large imaginary value of $x$, while the product is finite, Exp[-I*Pi*x] is very large while BesselK[-1, 2.43*Ix] is around $10^{-300}$ and Mathematica sets the latter to be equal to zero, which makes the product become equal to zero.

Is there a way to tell Mathematica not to do this?

The exact input is:

Exp[-I*Pi*x]*BesselK[-1, 2.43*I*x] /. x -> I*290 // N

This returns -1.97747*10^88 - 2.456351670414645*10^700I
If I write: Exp[-I*Pi*x]*BesselK[-1, 2.43*I*x] /. x -> I*291 // N
then it returns 0. - 6.445487767605421*10^702 I
So, there is a jump in the transition of x=290 to x=291

## closed as off-topic by Bob Hanlon, m_goldberg, gpap, Öskå, José Antonio Díaz NavasAug 25 '18 at 11:15

This question appears to be off-topic. The users who voted to close gave this specific reason:

• "This question arises due to a simple mistake such as a trivial syntax error, incorrect capitalization, spelling mistake, or other typographical error and is unlikely to help any future visitors, or else it is easily found in the documentation." – Bob Hanlon, m_goldberg, gpap, Öskå, José Antonio Díaz Navas
If this question can be reworded to fit the rules in the help center, please edit the question.

• What is the exact input that produces what? Do you really mean ix or rather I x? – Henrik Schumacher Aug 20 '18 at 20:05
• What is ix? Somthing like I x? – Ulrich Neumann Aug 20 '18 at 20:06
• Oh, yes, I meant Ix. I will edit the question. – TheQuantumMan Aug 20 '18 at 20:06
• What is "some number"? – Henrik Schumacher Aug 20 '18 at 20:09
• Can't reproduce this. – Jens Aug 20 '18 at 20:15

Use arbitrary precision rather than machine precision.

$Version (* "11.3.0 for Mac OS X x86 (64-bit) (March 7, 2018)" Exp[x]*BesselK[-1, I x] /. x -> I*290.20 (* 5.3594789574372585*10^124 - 3.6455728547082617*10^124 I *) Exp[x]*BesselK[-1, I x] /. x -> I*290 // N[#, 20] & (* 5.3594789574372584720*10^124 - 3.6455728547082616665*10^124 I *) EDIT: expr = Exp[-I Pi x]*BesselK[-1, I x] /. x -> I*706 // N[#, 650] &; expr // NumberForm[#, 6] & • Exp[-IPix]*BesselK[-1, 2.43*I*x] /. x -> I*291 // N[#, 20] & There still exists a jump between 290 and 291. – TheQuantumMan Aug 20 '18 at 20:32 • That's because you used the machine number 2.43. Calculations with machine numbers yield machine numbers without any precision tracking. Raising the precision to 20 afterward does nothing useful. – John Doty Aug 20 '18 at 20:41 • @JohnDoty If you put$1$at the place of$2.43\$, you get the jump between 705I and 705 I. But, that is by using //N and not //N[#,20]. (There seems to be a problem in my version with //N[#,20]) – TheQuantumMan Aug 20 '18 at 20:50
• Yes. //N takes you explicitly into the domain of machine numbers. So, implicitly, does 2.43. With machine numbers you get speed without precision control. But 1 is exact, and //N[#,20] gives you a controlled precision result. – John Doty Aug 20 '18 at 20:56
• @TheQuantumMan - You need to include the & after the //N[#,20] i.e., //N[#,20]& See Function – Bob Hanlon Aug 20 '18 at 21:00

fn[I*29120]