
Google doesn't like -2 * 2 - imdsm
Searching for &quot;-2 * 2&quot; or any other number between 1 and 9 in the format &quot;-&lt;num&gt; * &lt;num&gt;&quot; results in a long delay (~5 seconds) and empty SERP.
======
jhanschoo
This also happens if you search for, say, -1 1. At the time of this comment,
there has been multiple people hypothesizing behaviors like "confuses it" or
"causing a loop". I offer a possible explanation more grounded in information
retrieval basics.

Yes, one indeed is including and excluding the search term, ensuring that no
results satisfy the query. Why does this take so long? Probably, Google
evaluates a query until it retrieves the 30 or so most relevant results and
returns them. But with the contradictory query, none are found, and so the
retrieval continues until it times out.

But if you should try "-13 13", we do get results; this suggests that there is
a mode of retrieval gated by the query terms being more than one character in
length.

If we should try, say, "q -q", the number of results and retrieval time does
not pop up. however, it seems to take comparably long to execute.

Trying out "c -c", however, we still get the no. of results display, along
with the retrieval time. A card also pops up showing the calculation as
interpreting c to be the speed of light.

Thus it seems that the results counter and retrieval time is displated
whenever Google has something to say regarding the query, even if it is not a
search result; but it does not display it when it has absolutely nothing to
say. But even if it has nothing to say, it still spends the same large amount
of time attempting to retrieve results.

~~~
imdsm
Very interesting investigation. Thanks for that. I played around with it for a
while and wondered whether it may be a possible DoS attack vector, but the
security team didn't think so. If it's retrieving the most relevant results
and discarding them and grabbing more, perhaps it could be used nefariously to
put a big load on Google's infrastructure. Maybe.

Interesting though, isn't it!

------
vinchuco
Ambiguous

\- is used to exclude results

* is a wildcard

There's other search options i.e. for date ranges, "inurl:", "filetype:", and
looking for exact string matches using quotes. But sometimes they don't work
as well. Try:

    
    
      "define:-2*2"
    
      "2 * -2 * +2"

------
rcuv
Played around with this for a minute, interesting find. It seems to trigger a
parsing ambiguity, but only for specific forms of that query.

Notably, this doesn't happen for other multiplies I randomly plugged in
involving a positive and a negative. 2 * -2 has the same slow behavior as
well, but if you remove the whitespace from the query, or rewrite the -2 as
-(2) or (-2), it runs fast again.

Removing the white space from the query with the -2 as the first value doesn't
speed it up, only adding the parens does.

I think the big clue to what's actually going on is on parses that run in the
normal amount of time, Google also returns actual search results. I'm guessing
the slowness is coming from the search service timing out, but the calculator
service still returns, so you still get a result at all.

Good stuff, thanks for sharing.

~~~
imdsm
It's amazing that such a simple query could be discovered simply through my
self-doubt at multiplying negative numbers.

------
aequitas
"-2 * 2" shows the calculator with the correct result.

As others mentions maybe the minus is seen as exclusion parameter. So I tried
"-test test" which shows empty results. However searching "-2 2" (without the
wildcard, shows an empty map tile with "Map for -2 2", funny.

~~~
fotcorn
This is not an empty map tile, it just so happens that theses coordinates are
in the middle of the ocean:

[https://www.google.com/maps/place/2%C2%B000'00.0%22S+2%C2%B0...](https://www.google.com/maps/place/2%C2%B000'00.0%22S+2%C2%B000'00.0%22E/@-37.6087087,-14.8964589,3z/data=!4m5!3m4!1s0x0:0x0!8m2!3d-2!4d2)

------
milankragujevic
I think it might be related to the fact that you are excluding a keyword (-2)
then including it (2). That confuses it, maybe causes a loop?

------
ltmi600
It needs time to determine if you are searching the web for any text with "*
2" excluding (-) "-2". I'm sure that over time with enough of the same
calculation requests from different users it will become much faster at
producing the correct response, due to machine learning.

------
tomhoward
When I enter this in the Chrome search bar, it returns the correct answer
immediately in the dropdown menu.

When I hit Enter to submit the search, there's a delay while it loads the
calculator over my slow connection, then shows the calculator with the correct
answer in the display.

No problem.

------
federicoponzi
Seems like there is some issues with the -2 without a space in them.

\- 2 + 2 works fine while -2 + 2 does not. -2 +2 seems working though.

Also, try to search "-2" to get no results.

------
techno_modus
Same with "-2 + 2". Maybe it is loading its calculator implementation in
JavaScript (including all dependencies).

~~~
DougBTX
Just "2 * 2" is near enough instant ("About 25,270,000,000 results (0.64
seconds)") but "2 * -2" takes its time ("About 0 results (5.16 seconds)").

Some sort of conflict between the "ignore keyword using hyphen prefix" and the
"is it a calculation" detection, causing the search itself to time out and
produce zero results? Searching with quotes ("2 * -2") is fast ("About
25,270,000,000 results (0.49 seconds)") but no calculator is shown.

~~~
aryamaan
but searching -200 * 21 gives an instant result.

------
mchahn
I don't know how long google has offered the calculator but I discovered it
recently. I now use it daily. Awesome.

------
saxatrumpet
The time to complete the calculation was the same as 25*5 or any other
calculation I tried.

------
varjag
No problem here (Norway).

------
gshock
the is no problem with +2 +2

