4
$\begingroup$

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.

$\endgroup$
  • 3
    $\begingroup$ The problem is present also on 11.0. $\endgroup$ – kirma Aug 19 '16 at 16:35
  • 3
    $\begingroup$ Yes, the problem is present on 11.0.0 under Windows $\endgroup$ – user58955 Aug 19 '16 at 16:36
  • 1
    $\begingroup$ And I just checked that the problem is present in Wolfram Cloud $\endgroup$ – Stanislav Poslavsky Aug 19 '16 at 16:36
  • $\begingroup$ It works in 5.2, tho. $\endgroup$ – J. M. will be back soon Aug 19 '16 at 17:30
  • 1
    $\begingroup$ 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. $\endgroup$ – QuantumDot Aug 22 '16 at 19:44
1
$\begingroup$
$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.578095344423`15] // AbsoluteTiming

(*  {0.048323, -5.0879817774139 + 3.1345735597461 I}  *)
$\endgroup$
  • $\begingroup$ 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. $\endgroup$ – Stanislav Poslavsky Aug 19 '16 at 18:09
  • $\begingroup$ @StanislavPoslavsky As a fix, it should be enough to do the conversion before calling this function. Computing x * 1`15 should do it. I don't know how to convert back to machine-precision though. $\endgroup$ – masterxilo Aug 22 '16 at 18:30

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.