7

Bug fixed in 10.1.0


R = RegionUnion[Disk[{0, 0}, 1, {0, Pi}], Disk[{1/2, 0}, 1/2]] // 
  RegionDifference[#, RegionUnion[Disk[{1/2, 0}, 1/6], Disk[{-1/2, 0}, 1/2]]] &
(dr = DiscretizeRegion[R]) // Timing

If you run this codes in many times, you will find that it will give a result in 1 second with 50% probability,while it will not give a result in 100s with 50% probability.

win7 v10.0.2

Perhaps it is related to the performance of computer. The better the computer performance,the greater probability it gives a result in 1 second. If we run this codes in Wolfram Programming Cloud, it always give a result in 1 second.

ilian
  • 25,474
  • 4
  • 117
  • 186
Apple
  • 3,663
  • 16
  • 25
  • 2
    Please do not use the bugs tag until the issue has been confirmed as a bug by WRI or the Mathematica.SE community. – m_goldberg Feb 07 '15 at 14:39
  • What do you mean by "Sometimes"? Why do you think it should always finish the computation in less than 100 seconds? – m_goldberg Feb 07 '15 at 14:42
  • @m_goldberg If you run this codes in many times, you will find that it will give a result in 1 second with 50% probability,while it will not give a result in 100s with 50% probability. – Apple Feb 07 '15 at 14:50
  • I can reproduce the problem, though it happens much less frequently here (OS X, M10.0.2). You should report it to Wolfram. – Szabolcs Feb 07 '15 at 15:16
  • 2
    I can reproduce the problem, also on Windows 7 V10.0.2. Seems like a bug, but I'll let others decide on that. – DumpsterDoofus Feb 07 '15 at 16:07
  • In my case, it's more like approximately 65% chance of executing in 0.12 seconds, 30% chance of taking a very long time, and 5% chance of crashing the kernel instantly. – DumpsterDoofus Feb 07 '15 at 16:09
  • I can reproduce this as well on Win8.1 MMA 10.0.2 – Sjoerd C. de Vries Feb 07 '15 at 18:15
  • 1
    I can reproduce it in V10.0.2, Mac OSX 10.10.2. Not surprisingly it also happens with Needs["NDSolveFEM"]; ToElementMesh[R]. It does not happen with the option Method -> "RegionPlot", but the cusp is truncated. – Michael E2 Feb 08 '15 at 13:37
  • 1
    Seems fixed in current development code. – user21 Feb 09 '15 at 11:23
  • I do not understand what is the bug here. – Nasser Apr 02 '15 at 07:12

1 Answers1

3

As mentioned by user21 in the comments, this bug has been fixed as of version 10.1.0.

Table[(RegionUnion[Disk[{0, 0}, 1, {0, Pi}], Disk[{1/2, 0}, 1/2]] // 
         RegionDifference[#,RegionUnion[Disk[{1/2, 0}, 1/6], Disk[{-1/2, 0}, 1/2]]] &) //  
           DiscretizeRegion // AbsoluteTiming // First, {100}] // Mean       

(* 0.142127 *)
ilian
  • 25,474
  • 4
  • 117
  • 186