Is it possible to check if two numbers are equal only with arithmetic operators?
Clash Royale CLAN TAG#URR8PPP
up vote
0
down vote
favorite
I'm trying to find a function f(x,y) that returns 1 if the numbers are equal or 0 otherwise.
But I cannot wrap my head around it since I can't use functions like floor/ceil/absolute val.
elementary-number-theory
add a comment |Â
up vote
0
down vote
favorite
I'm trying to find a function f(x,y) that returns 1 if the numbers are equal or 0 otherwise.
But I cannot wrap my head around it since I can't use functions like floor/ceil/absolute val.
elementary-number-theory
1
Are all functions you are allowed to use continuous? Are you allowed to use limits?
â Hagen von Eitzen
Sep 2 at 8:21
just arithmetic operators
â oren revenge
Sep 2 at 8:23
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
I'm trying to find a function f(x,y) that returns 1 if the numbers are equal or 0 otherwise.
But I cannot wrap my head around it since I can't use functions like floor/ceil/absolute val.
elementary-number-theory
I'm trying to find a function f(x,y) that returns 1 if the numbers are equal or 0 otherwise.
But I cannot wrap my head around it since I can't use functions like floor/ceil/absolute val.
elementary-number-theory
elementary-number-theory
asked Sep 2 at 8:17
oren revenge
328112
328112
1
Are all functions you are allowed to use continuous? Are you allowed to use limits?
â Hagen von Eitzen
Sep 2 at 8:21
just arithmetic operators
â oren revenge
Sep 2 at 8:23
add a comment |Â
1
Are all functions you are allowed to use continuous? Are you allowed to use limits?
â Hagen von Eitzen
Sep 2 at 8:21
just arithmetic operators
â oren revenge
Sep 2 at 8:23
1
1
Are all functions you are allowed to use continuous? Are you allowed to use limits?
â Hagen von Eitzen
Sep 2 at 8:21
Are all functions you are allowed to use continuous? Are you allowed to use limits?
â Hagen von Eitzen
Sep 2 at 8:21
just arithmetic operators
â oren revenge
Sep 2 at 8:23
just arithmetic operators
â oren revenge
Sep 2 at 8:23
add a comment |Â
1 Answer
1
active
oldest
votes
up vote
6
down vote
accepted
This suggestion may raise a heated discussion, but
$$f(x,y)=0^(x-y)^2$$
works. Note that $0^0=1$ whereas $0^a=0$ for any $a>0$.
This is a very interesting and creative idea but I note that there is not a consensus on the value of $0^0$. Possibilities include $0$, $1$ and undefined. en.wikipedia.org/wiki/Zero_to_the_power_of_zero
â Simon Terrington
Sep 2 at 8:30
@SimonTerrington The heated discussion has begun!
â Sobi
Sep 2 at 8:45
:) and by the way I don't have a better idea and I really like your answer.
â Simon Terrington
Sep 2 at 8:49
add a comment |Â
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
6
down vote
accepted
This suggestion may raise a heated discussion, but
$$f(x,y)=0^(x-y)^2$$
works. Note that $0^0=1$ whereas $0^a=0$ for any $a>0$.
This is a very interesting and creative idea but I note that there is not a consensus on the value of $0^0$. Possibilities include $0$, $1$ and undefined. en.wikipedia.org/wiki/Zero_to_the_power_of_zero
â Simon Terrington
Sep 2 at 8:30
@SimonTerrington The heated discussion has begun!
â Sobi
Sep 2 at 8:45
:) and by the way I don't have a better idea and I really like your answer.
â Simon Terrington
Sep 2 at 8:49
add a comment |Â
up vote
6
down vote
accepted
This suggestion may raise a heated discussion, but
$$f(x,y)=0^(x-y)^2$$
works. Note that $0^0=1$ whereas $0^a=0$ for any $a>0$.
This is a very interesting and creative idea but I note that there is not a consensus on the value of $0^0$. Possibilities include $0$, $1$ and undefined. en.wikipedia.org/wiki/Zero_to_the_power_of_zero
â Simon Terrington
Sep 2 at 8:30
@SimonTerrington The heated discussion has begun!
â Sobi
Sep 2 at 8:45
:) and by the way I don't have a better idea and I really like your answer.
â Simon Terrington
Sep 2 at 8:49
add a comment |Â
up vote
6
down vote
accepted
up vote
6
down vote
accepted
This suggestion may raise a heated discussion, but
$$f(x,y)=0^(x-y)^2$$
works. Note that $0^0=1$ whereas $0^a=0$ for any $a>0$.
This suggestion may raise a heated discussion, but
$$f(x,y)=0^(x-y)^2$$
works. Note that $0^0=1$ whereas $0^a=0$ for any $a>0$.
answered Sep 2 at 8:23
Hagen von Eitzen
267k21259482
267k21259482
This is a very interesting and creative idea but I note that there is not a consensus on the value of $0^0$. Possibilities include $0$, $1$ and undefined. en.wikipedia.org/wiki/Zero_to_the_power_of_zero
â Simon Terrington
Sep 2 at 8:30
@SimonTerrington The heated discussion has begun!
â Sobi
Sep 2 at 8:45
:) and by the way I don't have a better idea and I really like your answer.
â Simon Terrington
Sep 2 at 8:49
add a comment |Â
This is a very interesting and creative idea but I note that there is not a consensus on the value of $0^0$. Possibilities include $0$, $1$ and undefined. en.wikipedia.org/wiki/Zero_to_the_power_of_zero
â Simon Terrington
Sep 2 at 8:30
@SimonTerrington The heated discussion has begun!
â Sobi
Sep 2 at 8:45
:) and by the way I don't have a better idea and I really like your answer.
â Simon Terrington
Sep 2 at 8:49
This is a very interesting and creative idea but I note that there is not a consensus on the value of $0^0$. Possibilities include $0$, $1$ and undefined. en.wikipedia.org/wiki/Zero_to_the_power_of_zero
â Simon Terrington
Sep 2 at 8:30
This is a very interesting and creative idea but I note that there is not a consensus on the value of $0^0$. Possibilities include $0$, $1$ and undefined. en.wikipedia.org/wiki/Zero_to_the_power_of_zero
â Simon Terrington
Sep 2 at 8:30
@SimonTerrington The heated discussion has begun!
â Sobi
Sep 2 at 8:45
@SimonTerrington The heated discussion has begun!
â Sobi
Sep 2 at 8:45
:) and by the way I don't have a better idea and I really like your answer.
â Simon Terrington
Sep 2 at 8:49
:) and by the way I don't have a better idea and I really like your answer.
â Simon Terrington
Sep 2 at 8:49
add a comment |Â
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fmath.stackexchange.com%2fquestions%2f2902481%2fis-it-possible-to-check-if-two-numbers-are-equal-only-with-arithmetic-operators%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
1
Are all functions you are allowed to use continuous? Are you allowed to use limits?
â Hagen von Eitzen
Sep 2 at 8:21
just arithmetic operators
â oren revenge
Sep 2 at 8:23