Is This a Bug? Common Questions About How Desmos Calculates and Graphs

In this article, we answer some of the most common questions we hear about how our tools work and why they might return unexpected results.

Each behavior is either a deliberate choice we've made or a limit of how computers can calculate and draw. For each one, we explain what you might see, why it happens, and the workarounds we recommend.

 

Calculations

 

Why is Desmos telling me that \(0^0=1\)?

Short answer: There's more than one reasonable answer, and Desmos's answer is \(1\).

What you might see: You type \(0^0\), and Desmos gives you \(1\). But you may have learned that \(0^{0}\) is undefined or even that it equals \(0\).

Why it happens: You're not wrong! The value of \(0^{0}\) is one of those questions that always sparks interesting discussions. There are good arguments for \(0\), \(1\), and undefined, depending on how you think about exponents.

Since all of those answers are right in some sense, the value of \(0^0\) comes down to a choice, or what mathematicians call a convention. After considering all the different calculations the calculator supports, we think \(0^0=1\) is the most elegant and useful of these conventions. It's also the one most mathematicians prefer because it keeps some beautiful results (like the binomial theorem) working without special exceptions.

For the curious: This article lays out the arguments for each answer and explains why mathematicians and classroom teachers sometimes disagree.

 

Why do I see tiny numbers like \(1.1×10^{-16}\) instead of \(0\)?

Short answer: The system that many calculators use for arithmetic relies on rounding.

What you might see: An answer that's almost right, like a long string of decimals when you had expected something like \(3\) or \(0.5\). Or, a very small number when you had expected \(0\).

Why it happens: Think about writing \(\frac{1}{3}\) as a decimal. You can write \(0.333333...\) for as long as you like, but at some point, you have to stop, and your answer is slightly off.

Computers have the same problem, just with different numbers. They store numbers in binary (\(1\)s and \(0\)s), and some everyday decimals, like \(0.1\), can't be stored exactly. Desmos keeps about 16 digits and rounds after every step of a calculation, so tiny differences can sometimes show up in your answer or on your graph.

This isn't unique to Desmos. Many calculators and computer programs work this way, and we use it because it's fast and reliable on the web.

For the curious: Desmos uses a number format called double-precision floating point. A few things to know about it:

  • It has about 16 decimal digits of precision. It uses an exponent, like scientific notation, to keep that accuracy across very large and very small numbers.
  • Results are rounded to about 16 digits after every operation, such as each addition or subtraction, not just at the end.
  • The largest number it can hold is about \(1.8×10^{308}\), and the smallest positive number is about \(5.0×10^{-324}\).

Desmos doesn't always rely on this format, though. In many cases it uses exact fractions to avoid rounding altogether.

 

Why does \(\frac{1}{0}\) return undefined, but \(\frac{1}{\text{undefined}}\) or \(\frac{1}{\frac{1}{0}}\) equals \(0\)?

Short answer: Because of the way rounding works in Desmos, it can be useful to treat division by zero as a special value rather than undefined.

What you might see: \(\frac{1}{0}\) shows as undefined, which makes sense. But \(\frac{1}{\frac{1}{0}}\) gives you \(0\), which can be surprising.

Why it happens: Behind the scenes, Desmos treats \(\frac{1}{0}\) as infinity and shows it on screen as undefined. Then, \(1\) divided by infinity is \(0\).

This follows a widely used computing standard, and it's helpful because of the rounding described in the previous question. In complicated calculations, a very tiny number can get rounded down to \(0\). Treating \(\frac{1}{0}\) as infinity means those calculations can still give sensible answers instead of breaking.

Why it's a compromise: This behavior can be distracting when you're learning about real numbers, where dividing by \(0\) is simply undefined. But it's useful for complicated calculations where small approximations are fine, and a lot of important work is like that.

Desmos cares about both perspectives, so we've made a compromise: the calculator follows the computing standard behind the scenes but displays every one of these special results as undefined.

For the curious: These rules come from the IEEE floating point standard, which is used for scientific computing on almost all computers (though not on most pocket calculators). It includes a few special values that aren't real numbers: infinity, \(-\)infinity, and not a number (NaN).

This standard includes specific rules for calculating \(a\) divided by \(0\):

  • If \(a\) is \(0\) or NaN, the result is NaN
  • If \(a\) is positive, the result is infinity
  • If \(a\) is negative, the result is \(-\)infinity

Desmos shows all three of these special values as undefined.

To see why this is helpful, we can think about the case of a really tiny number, such as letting \(a=3^{-1000}\). While not actually zero, Desmos will display this as the rounded value of \(0\). Under these rules, \(\frac{1}{a}\) is infinity, so a check like \(\frac{1}{a}>1\) still comes out true, as it should. And \(\frac{1}{\frac{1}{a}}\) gives \(0\), which is a more useful answer than undefined. Here's an example graph showing these calculations.

 

Graphs

 

Why doesn't my graph show a hole, and how can I add one?

Short answer: Desmos usually can't detect a single missing point, but you can add one yourself.

What you might see: A graph that looks like one smooth, unbroken line or curve, even though the function is undefined at one point. For example, \(y=\frac{(x^2-4)}{(x+2)}\) looks just like the line \(y=x-2\) with no open circle at \(x=-2\), where you might expect to see a hole.

Why it happens: Desmos draws a graph by calculating your function at lots of points across the screen and then connecting those points with short line segments, a bit like a very fast connect-the-dots.

A hole is a single missing point. It doesn't change the function's values anywhere else, so there's nothing nearby to give it away. Unless Desmos happens to calculate the function at exactly that spot and sees that it's undefined, it has no way to know the hole is there.

That's why holes usually aren't shown. The exception is when a trace point lands exactly on the undefined value.

What you can do: If it's important to see the hole in your graph, you can manually add it. First create a point at the hole's location. Then press and hold the point's Color Icon and change its style to Open.

Here's an example graph with a hole at \(x=-2\).

You can also convert your function to a table to look for undefined values. This is a handy way to find and check where holes are.

 

Why is part of my graph or shading missing when the equation isn't solved for \(y\)?

Short answer: When an equation isn't solved for \(y\), Desmos has to search for the curve by sampling many \((x,y)\) points, and that search can miss some spots.

What you might see: An equation that should draw a line or curve shows nothing or only part of it. If you're shading with multiple inequalities, your shaded region may appear choppy or inconsistent.

Why it happens: Many equations have \(y\) on its own, like \(y=2x+1\). For these, Desmos can work out \(y\) for each \(x\) and draw the graph precisely.

When \(x\) and \(y\) are mixed together, like in \(x^2+\text{sin}(xy)=1\), Desmos can't simply calculate the values of one variable in terms of the other. Instead, it checks lots of points across the screen. At each point, it subtracts one side of the equation from the other and looks at whether the result is positive or negative. Wherever the result switches from positive to negative, the two sides must be equal somewhere in between, so Desmos draws the curve there.

Inequalities work the same way. Desmos tests many different points on the graph paper and looks for the edge where the inequality switches from true to false, then shades the true side.

Why some graphs go missing: This method only finds places where the result switches. If the two sides are equal along a line but the result is positive on both sides of that line (or negative on both sides), there's no switch to find. Desmos can miss that part of the graph even though it's mathematically there.

Here's an example notebook with the graph of \((x+y)^4=0\).

The value of \((x+y)^4\) is never negative, so the difference between the two sides is \(0\) on the line \(y=-x\) and positive everywhere else. It never switches, so Desmos may not draw the line.

Why not just check where the two sides are exactly equal? That would work for whole numbers, but once decimals are involved, rounding means that values that should be exactly equal often come out slightly different. Graphs found this way would break into lots of little pieces.

Why shading can look choppy: Desmos checks separate points rather than every single point, so small or tight details can come out rough or patchy.

What you can do: If you can, rewrite the equation so \(y\) (or \(x\)) is on its own. In the example above, graphing \(y=-x\) draws the line directly. Zooming in can also smooth out rough edges. For shading regions, you can try representing multiple inequalities using the min function or consider using polygons.

 

Didn't Find Your Answer?

If something still doesn't look right, we'd love to hear from you. Submit a request, and include a link to your graph so we can take a look.

You can also browse our FAQs or check out tutorials on the Desmos YouTube channel.