Skip to main content
Became Hot Network Question
Tweeted twitter.com/StackCodeGolf/status/1540258442660790272
added 1 character in body
Source Link
Bubbler
  • 79.3k
  • 5
  • 162
  • 485

So I have the situation where I have one boolean value a and, if that one is true and b<c I want it to end up as true, if a is false and b>c I want it to resolve as true as well. If b=c I want it to mebe always false, no matter the value b and c are both numbers. My best approach so far is a?b<c:b>c or maybe b^c^a^b<c. Is there any shorter approach.? I can’t stop thinking about it, and want confirmation this is the shortest possible way or find the solution...

So I have the situation where I have one boolean value a and if that one is true and b<c I want it to end up as true, if a is false and b>c I want it to resolve as true as well. If b=c I want it to me always false, no matter the value b and c are both numbers. My best approach so far is a?b<c:b>c or maybe b^c^a^b<c. Is there any shorter approach. I can’t stop thinking about it, and want confirmation this is the shortest possible way or find the solution...

So I have the situation where I have one boolean value a and, if that one is true and b<c I want it to end up as true, if a is false and b>c I want it to resolve as true as well. If b=c I want it to be always false, no matter the value b and c are both numbers. My best approach so far is a?b<c:b>c or maybe b^c^a^b<c. Is there any shorter approach? I can’t stop thinking about it, and want confirmation this is the shortest possible way or find the solution...

added 2 characters in body; edited tags; edited title
Source Link
Sisyphus
  • 15.1k
  • 3
  • 48
  • 89

Can `a?b<c:b>c` be shortened in charactersJavascript?

So I have the situation where I have one boolean value a and if that one is true and b<c I want it to end up as true, if a is false and b>c I want it to resolve as true as well. If b=c I want it to me always false, no matter the value b and c are both numbers. My best approach so far is a?b<c:b>c or maybe b^c^a^b<c. Is there any shorter approach. I can’t stop thinking about it, and want confirmation this is the shortest possible way or find the solution…solution...

Can `a?b<c:b>c` be shortened in characters?

So I have the situation where I have one boolean value a and if that one is true and b<c I want it to end up as true, if a is false and b>c I want it to resolve as true as well. If b=c I want it to me always false, no matter the value b and c are both numbers. My best approach so far is a?b<c:b>c or maybe b^c^a^b<c. Is there any shorter approach. I can’t stop thinking about it, and want confirmation this is the shortest possible way or find the solution…

Can `a?b<c:b>c` be shortened in Javascript?

So I have the situation where I have one boolean value a and if that one is true and b<c I want it to end up as true, if a is false and b>c I want it to resolve as true as well. If b=c I want it to me always false, no matter the value b and c are both numbers. My best approach so far is a?b<c:b>c or maybe b^c^a^b<c. Is there any shorter approach. I can’t stop thinking about it, and want confirmation this is the shortest possible way or find the solution...

Source Link

Can `a?b<c:b>c` be shortened in characters?

So I have the situation where I have one boolean value a and if that one is true and b<c I want it to end up as true, if a is false and b>c I want it to resolve as true as well. If b=c I want it to me always false, no matter the value b and c are both numbers. My best approach so far is a?b<c:b>c or maybe b^c^a^b<c. Is there any shorter approach. I can’t stop thinking about it, and want confirmation this is the shortest possible way or find the solution…