# Hypergeometric2F1 hangs on certain numeric input with Mathematica 10

Bug introduced in 9.0 or earlier and fixed in 11.1.0

This works fine:

Derivative[0, 1, 0, 0][Hypergeometric2F1][1, 0, 2,  I/10^15 + 447.57809534442]


and gives -5.08798 + 3.13457 I within tiny milliseconds as expected. However, with this input

Derivative[0, 1, 0, 0][Hypergeometric2F1][1, 0, 2,  I/10^15 + 447.578095344423]


Mathematica hangs for several minutes, so I have no enough patience to wait for the answer. What is the reason and how I can overcome this behaviour?

I use Mathematica 10.2.0 for Mac OS X x86 (64-bit) (July 7, 2015). Just checked this example with Mathematica 8 on Linux and all works fine, so this issue is version/OS specific.

• The problem is present also on 11.0. – kirma Aug 19 '16 at 16:35
• Yes, the problem is present on 11.0.0 under Windows – user58955 Aug 19 '16 at 16:36
• And I just checked that the problem is present in Wolfram Cloud – Stanislav Poslavsky Aug 19 '16 at 16:36
• It works in 5.2, tho. – J. M. will be back soon Aug 19 '16 at 17:30
• I'm a bit surprised it doesn't take the derivative symbolically first. Derivative[0, 1, 0, 0][Hypergeometric2F1][1, 0, 2, x] is equal to 1 - Log[1 - x] + Log[1 - x]/x. – QuantumDot Aug 22 '16 at 19:44

\$Version

(*  "11.0.0 for Mac OS X x86 (64-bit) (July 28, 2016)"  *)

Derivative[0, 1, 0, 0][Hypergeometric2F1][1, 0, 2,
I/10^15 + 447.57809534442] // AbsoluteTiming

(*  {0.065291, -5.08798 + 3.13457 I}  *)


For the second case, use arbitrary-precision rather than machine precision

Derivative[0, 1, 0, 0][Hypergeometric2F1][1, 0, 2,
I/10^15 + 447.57809534442315] // AbsoluteTiming

(*  {0.048323, -5.0879817774139 + 3.1345735597461 I}  *)

• But how I can setup Mathematica to use arbitrary-precision rather than machine precision automatically? I can't just insert "15" manually to each number that appears in my program and external libraries that I use. – Stanislav Poslavsky Aug 19 '16 at 18:09
• @StanislavPoslavsky As a fix, it should be enough to do the conversion before calling this function. Computing x * 115` should do it. I don't know how to convert back to machine-precision though. – masterxilo Aug 22 '16 at 18:30