# Kernel crashes when plotting $z=\sqrt{(x^2 + y^2)}^0$

Bug introduced in 7.0.1 or earlier and fixed in 10.0.1

I'm plotting a 3D function, which makes Mathematica V9 (running on Windows 7) crash all the time. Does this only happen for me or for somebody else as well?

Plot3D[(Sqrt[x^2 + y^2])^0, {x, -2, 2}, {y, -2, 2}]


(I know that this function alone is not useful, but I found it in a much more complex function, and tracked down the actual source). If I use a power of something other than 0, it works.

The error-message is:

Mathematica Kernel for Windows has stopped working

Windows can check online for a solution to the problem.

Can somebody confirm the problem?

• confirmed, but so what? The workaround is "don't do that".. (Wrapping the expression in Evaluate fixes it.. ) – george2079 Sep 16 '14 at 20:42
• Confirmed with V10 running on OS X. – m_goldberg Sep 16 '14 at 20:52
• @george2079 I know that one can workaround by not doing it. but the problem arose in a serios calculation where some terms cancled such that the problematic part appeared. For this question, I have tracked the problem down to reduce "noise" in the question. – Mario Krenn Sep 16 '14 at 21:05
• @george2079 I'd argue that the kernel should never crash, and instances in which it does so in a reproducible way should be considered bugs. If this is really a "don't do that" situation, it should print an error message rather than taking down the entire kernel. – Guillochon Sep 16 '14 at 21:13
• completely agreed with previous commenters that "don't do that" is the wrong response. The kernel should NEVER crash, and for that it doesn't matter how the crash was produced. The crash itself is the problem. The existence of a work-around is never sufficient to accept a kernel crash. It's like saying "if a certain plane type repeatedly crashes, don't use the plane, drive by car". We can't acquit the faulty system just because we can adapt our behavior (how we cope with the problem). It's still a problem. – Andreas Lauschke Sep 16 '14 at 22:18