# How-To Geek

## Do You Know About These Windows Calculator Easter Eggs?

Everybody loves a good Easter egg, and here’s a couple of oddities we found in the Windows calculator that we thought we’d share. How many of them did you already know about?

You’ll probably notice that some of these aren’t technically Easter eggs—in fact, one of them is a bug. But since they are indeed unexpected behavior, keep reading for the fun.

### Grab a Slice of Windows Calculator Pie

Copy this word to the clipboard, and then paste it into the Calculator window (with Ctrl+V).

pi

Fun!

Of course, this really doesn’t work the way you’d think—in fact, if you just hit the “p” key it’ll do the same thing, since that’s the accelerator key for the pi symbol.

### Calculate Equations with the Clipboard

You can also use the clipboard trick to copy an equation into the calculator and process it. For instance, copy this to the clipboard:

328 * 4 + 25 =

Then paste it in with Ctrl+V.

### The Square Root of 4, Less 2, Equals… –1.06?

This one is actually a bug, but it’s kinda entertaining. You can use this in the regular mode as well, so we’ll show that here—just type in 4, hit the square root button shown in the screenshot on the left-hand side, then subtract 2 from that.

And what you’ll see is this… weird.

*Note:* this article idea was inspired after somebody sent me this video.

*Update:* Looks like reader Debajyoti also sent in this idea the other day, which is indirectly how it came across to us. Thanks!

So…. do you know of any others?

In scientific calculator, u get different answer while performing the last trick you mentioned, i.e.,

sqrt(4) – 2 = -8.16484659….

tried the last one in scientific view. output was different

That’s right, I’m going to be “that guy”.

In that last one, it is of course a bug in that computers aren’t as good at representing numbers as you think they might be, but it should be noted that sqrt(4) – 2 doesn’t equal 1.06, but 1.06 x 10^-19. That’s 0.000000000000000000106. So it’s not really that far off from the actual answer of 0.

As for the scientific calculator, you’ll notice that it’s -8.16… e-39. So 0.0 followed by 38 zeros, and then 816. The scientific calculator is much more precise than the normal calculator, but it’s still not immune to the fact that it’s implemented on a computer.

@Trevor

You’re such a nerd. Glad you’re on our team =)

Hi, how did you come up with your idea? :D

I have a good email describing the difference between Windows calculator and Calculator (bc command).

The difference that you shall see will blow ur mind…

How can I post u that?

Apart from the square roots the other two are just calculations. They are not easter bugs. And I think Trevor is right about the result affected by the computer

That last ‘bug’ is a good reason why you should never use IEEE floating points for calculator apps.

@Trevor: you were just quicker, I would have mentioned the same (maybe not as eleborate as you, but still). That Guys that was Quicker =P

I like the one where you type in 58008 and turn your monitor upside down :P

You can just type p in the scientific calculator to enter pi.

@brizian O RLY?

@brizian works in the standard calculator too

try typing L & N

I can spell BOOBS on the calculator?

;)

This article is completely lame. By definition, an Easter Egg is a undocumented feature that the developers hide in the user interface. Shortcut keys that are documented under the Help menu. Just because almost everyone is too lazy to RTFM does not make those features Easter Eggs.

Second, as stated above, rounding errors are neither bugs nor Easter Eggs, they are design weaknesses. This weakness documents what happens when newby programmers make the common mistake of trying to compare if two floating-point values are equal.

nice tips

@Trevor

Good explanation.

Trevor, can’t let you have all the fun here…

Yes this is the remainder caused by the finite depth of the math registers inside the cpu.

Of course on an old style calc u could also type 71077345 for ShELLOIL

can we download this cal if we can download then plz send me its web add

JohnJohn, even if somewhat pedantically, you put the dots over the i’s. Kudos and thanks.

when using the Desk Essentials v2.2 (Windows Gadget) on Win7 x64 calculator with the Square Root of 4, Less 2, Equals… I get 0 – yup big fat ZERO!

When I went to school (a long time ago) pi = 22/7 or 3.1428571 recurring – am I missing something?

Matt, 22/7 is an approximation to pi, whose actual value is 3.1415926535897932384626433832795028… and is not actually a rational number.

Thanks – live & learn eh?

Just try in scientific view: 3+4*5. Then do the same in standard view.

Standard View: 3+4*5 = 35

Scientific View: 3+4*5 = 23

I think scientific calc remember the rules MDAS…hehehehe 5*4+3 = 23

Easter Eggs? More like “Pretty standard and boring things calculators do.”

@ stewart yea scientific calc’s do remember the rules of and it is now called BIDMAS the its brackets, indices, divide, multiply, add and subtract :)

The last “bug” actually arises from the way the calculator calculates square roots or any other non-integer power. It does this through an exponential manipulation where x^y becomes e^(y*ln(x)). Because these are all floats (I suspect), this is never an exact calculation but is a really accurate approximation leaving little tiny errors at the end of the number, when 2 is subtracted from the square root of two these errors become dominant and are expressed by the calculator.

Computers calculate the square root by first making a rough guess from the number digits. Then by squaring the guess and subtracting it from the number, the resulting error is calculated. A new guess is calculated from the previous guess and the resulting error calculated. This iterative process is repeated until the error is very small (number of significant digits allocated for the floating point number). When the integer 2 is subtracted it reveals the difference between when algorithm stopped and the known value. A floating point number consists of the significant digits and base exponent. Referring to Trevor’s comment, 0.0000000000000000000106 can be stored as a floating point number (three significant digits) but 2.0000000000000000000106 (23 significant digits) cannot be stored because it exceeds the number of significant digits available and is therefore rounded to 2.000000… Thats why you get the square root of 4 equals 2 but the square root of 2 minus 2 is a very small number.

You can also get some weird answers with: sqrt(4)-4=-4.561669785727164e-20 sqrt(9)-3=1.121252885047248e-19 sqrt(5)-5=1.232432782637003e-18, basically any sqrt of a number subtracting the sqrt root of the number will give you an answer other than zero. But for all practical purposes, 1.232432782637003e-18 is actually 00000000000000001232432782647003 or for intensive purposes 0. for some reason when Microsoft wrote the code, they didn’t check this function out. I’ve found that any number will work…so nifty neato eh?

Easter eggs?! In CALCULATOR?!?! :O

The scientific gives you two different answers depending on the input. sqrt(4)-2 = -8.16e-39 and (4^0.5)-2 = 1.06e-38. Different ending results brought on by two different but exact ways of getting there.

very not pad

only view .how to download it very useful

And now the real easter eggs?

I’m pretty sure that clipboard(pi) => 3.14159etc is really an easter egg, rather an intended feature. Same goes for the 1337 calculation, you can throw any calculation in there.

And the last “”easter egg”" is just a bug as explained before me.

What a genius article…

When Computer compute the square root its show the answer 2

but actually its save an other number in memory =2+-error

hence this number can be show by this equation:

sqr(4)=2+–e

e=0.0000000001

then

sqr(4)-2=2+-e-2=e

then the final result=0.0000000001 Approximately