Which big number is bigger?Which really big number is bigger?Can the number reach 1 by repeatedly subtracting...
How bug prioritization works in agile projects vs non agile
Is there really no use for MD5 anymore?
A strange hotel
Prove that the countable union of countable sets is also countable
Can a stored procedure reference the database in which it is stored?
Is there metaphorical meaning of "aus der Haft entlassen"?
What is the most expensive material in the world that could be used to create Pun-Pun's lute?
Which big number is bigger?
Why do real positive eigenvalues result in an unstable system? What about eigenvalues between 0 and 1? or 1?
Why did C use the -> operator instead of reusing the . operator?
Could moose/elk survive in the Amazon forest?
What is the unit of time_lock_delta in LND?
How to not starve gigantic beasts
I preordered a game on my Xbox while on the home screen of my friend's account. Which of us owns the game?
How much of a wave function must reside inside event horizon for it to be consumed by the black hole?
How do I deal with a coworker that keeps asking to make small superficial changes to a report, and it is seriously triggering my anxiety?
How can I wire a 9-position switch so that each position turns on one more LED than the one before?
"The cow" OR "a cow" OR "cows" in this context
Can I criticise the more senior developers around me for not writing clean code?
Where was the County of Thurn und Taxis located?
Magical attacks and overcoming damage resistance
Why did Rep. Omar conclude her criticism of US troops with the phrase "NotTodaySatan"?
Combinatorics problem, right solution?
A faster way to compute the largest prime factor
Which big number is bigger?
Which really big number is bigger?Can the number reach 1 by repeatedly subtracting the largest prime less than it?True and false and trueIs this number a factorial?Do two numbers contain unique powers of 2Do two numbers contain unique factorials?Impossible cube maybeGolf a number bigger than TREE(3)Date within range?Which number is bigger?Which really big number is bigger?
$begingroup$
Input
Integers a1, a2, a3, b1, b2, b3 each in the range 1 to 20.
Output
True if a1^(a2^a3) > b1^(b2^b3) and False otherwise.
^ is exponentiation in this question.
Rules
This is code-golf. Your code must terminate correctly within 10 seconds for any valid input on a standard desktop PC.
You can output anything Truthy for True and anything Falsey for False.
You can assume any input order you like as long as its specified in the answer and always the same.
Test cases
3^(4^5) > 5^(4^3)
1^(2^3) < 3^(2^1)
3^(6^5) < 5^(20^3)
20^(20^20) > 20^(20^19)
20^(20^20) is not bigger than 20^(20^20)
2^2^20 > 2^20^2
code-golf
$endgroup$
|
show 13 more comments
$begingroup$
Input
Integers a1, a2, a3, b1, b2, b3 each in the range 1 to 20.
Output
True if a1^(a2^a3) > b1^(b2^b3) and False otherwise.
^ is exponentiation in this question.
Rules
This is code-golf. Your code must terminate correctly within 10 seconds for any valid input on a standard desktop PC.
You can output anything Truthy for True and anything Falsey for False.
You can assume any input order you like as long as its specified in the answer and always the same.
Test cases
3^(4^5) > 5^(4^3)
1^(2^3) < 3^(2^1)
3^(6^5) < 5^(20^3)
20^(20^20) > 20^(20^19)
20^(20^20) is not bigger than 20^(20^20)
2^2^20 > 2^20^2
code-golf
$endgroup$
5
$begingroup$
It would probably also benefit from normal, broadly-defined decision-problem output instead of being restricted to1and0
$endgroup$
– Unrelated String
14 hours ago
2
$begingroup$
Can we take the inputs in any order?
$endgroup$
– Kevin Cruijssen
14 hours ago
6
$begingroup$
@Anush Imposing a specific order of inputs it not common at all. You should specify that very clearly in the text. By default imput order and format are flexible
$endgroup$
– Luis Mendo
14 hours ago
1
$begingroup$
@Anush The question cannot always be correct. If floating-point limitations are not allowed, the code will have to use integers, or big integers, or symbolic math. Each of those eventually fail (due to data-type or memory limitations) for big enough inputs
$endgroup$
– Luis Mendo
13 hours ago
2
$begingroup$
@Anush Great, -4 bytes in that case :) You might want to edit the rules mentioned in the comments to the challenge description.
$endgroup$
– Kevin Cruijssen
12 hours ago
|
show 13 more comments
$begingroup$
Input
Integers a1, a2, a3, b1, b2, b3 each in the range 1 to 20.
Output
True if a1^(a2^a3) > b1^(b2^b3) and False otherwise.
^ is exponentiation in this question.
Rules
This is code-golf. Your code must terminate correctly within 10 seconds for any valid input on a standard desktop PC.
You can output anything Truthy for True and anything Falsey for False.
You can assume any input order you like as long as its specified in the answer and always the same.
Test cases
3^(4^5) > 5^(4^3)
1^(2^3) < 3^(2^1)
3^(6^5) < 5^(20^3)
20^(20^20) > 20^(20^19)
20^(20^20) is not bigger than 20^(20^20)
2^2^20 > 2^20^2
code-golf
$endgroup$
Input
Integers a1, a2, a3, b1, b2, b3 each in the range 1 to 20.
Output
True if a1^(a2^a3) > b1^(b2^b3) and False otherwise.
^ is exponentiation in this question.
Rules
This is code-golf. Your code must terminate correctly within 10 seconds for any valid input on a standard desktop PC.
You can output anything Truthy for True and anything Falsey for False.
You can assume any input order you like as long as its specified in the answer and always the same.
Test cases
3^(4^5) > 5^(4^3)
1^(2^3) < 3^(2^1)
3^(6^5) < 5^(20^3)
20^(20^20) > 20^(20^19)
20^(20^20) is not bigger than 20^(20^20)
2^2^20 > 2^20^2
code-golf
code-golf
edited 11 hours ago
Anush
asked 14 hours ago
AnushAnush
899729
899729
5
$begingroup$
It would probably also benefit from normal, broadly-defined decision-problem output instead of being restricted to1and0
$endgroup$
– Unrelated String
14 hours ago
2
$begingroup$
Can we take the inputs in any order?
$endgroup$
– Kevin Cruijssen
14 hours ago
6
$begingroup$
@Anush Imposing a specific order of inputs it not common at all. You should specify that very clearly in the text. By default imput order and format are flexible
$endgroup$
– Luis Mendo
14 hours ago
1
$begingroup$
@Anush The question cannot always be correct. If floating-point limitations are not allowed, the code will have to use integers, or big integers, or symbolic math. Each of those eventually fail (due to data-type or memory limitations) for big enough inputs
$endgroup$
– Luis Mendo
13 hours ago
2
$begingroup$
@Anush Great, -4 bytes in that case :) You might want to edit the rules mentioned in the comments to the challenge description.
$endgroup$
– Kevin Cruijssen
12 hours ago
|
show 13 more comments
5
$begingroup$
It would probably also benefit from normal, broadly-defined decision-problem output instead of being restricted to1and0
$endgroup$
– Unrelated String
14 hours ago
2
$begingroup$
Can we take the inputs in any order?
$endgroup$
– Kevin Cruijssen
14 hours ago
6
$begingroup$
@Anush Imposing a specific order of inputs it not common at all. You should specify that very clearly in the text. By default imput order and format are flexible
$endgroup$
– Luis Mendo
14 hours ago
1
$begingroup$
@Anush The question cannot always be correct. If floating-point limitations are not allowed, the code will have to use integers, or big integers, or symbolic math. Each of those eventually fail (due to data-type or memory limitations) for big enough inputs
$endgroup$
– Luis Mendo
13 hours ago
2
$begingroup$
@Anush Great, -4 bytes in that case :) You might want to edit the rules mentioned in the comments to the challenge description.
$endgroup$
– Kevin Cruijssen
12 hours ago
5
5
$begingroup$
It would probably also benefit from normal, broadly-defined decision-problem output instead of being restricted to
1 and 0$endgroup$
– Unrelated String
14 hours ago
$begingroup$
It would probably also benefit from normal, broadly-defined decision-problem output instead of being restricted to
1 and 0$endgroup$
– Unrelated String
14 hours ago
2
2
$begingroup$
Can we take the inputs in any order?
$endgroup$
– Kevin Cruijssen
14 hours ago
$begingroup$
Can we take the inputs in any order?
$endgroup$
– Kevin Cruijssen
14 hours ago
6
6
$begingroup$
@Anush Imposing a specific order of inputs it not common at all. You should specify that very clearly in the text. By default imput order and format are flexible
$endgroup$
– Luis Mendo
14 hours ago
$begingroup$
@Anush Imposing a specific order of inputs it not common at all. You should specify that very clearly in the text. By default imput order and format are flexible
$endgroup$
– Luis Mendo
14 hours ago
1
1
$begingroup$
@Anush The question cannot always be correct. If floating-point limitations are not allowed, the code will have to use integers, or big integers, or symbolic math. Each of those eventually fail (due to data-type or memory limitations) for big enough inputs
$endgroup$
– Luis Mendo
13 hours ago
$begingroup$
@Anush The question cannot always be correct. If floating-point limitations are not allowed, the code will have to use integers, or big integers, or symbolic math. Each of those eventually fail (due to data-type or memory limitations) for big enough inputs
$endgroup$
– Luis Mendo
13 hours ago
2
2
$begingroup$
@Anush Great, -4 bytes in that case :) You might want to edit the rules mentioned in the comments to the challenge description.
$endgroup$
– Kevin Cruijssen
12 hours ago
$begingroup$
@Anush Great, -4 bytes in that case :) You might want to edit the rules mentioned in the comments to the challenge description.
$endgroup$
– Kevin Cruijssen
12 hours ago
|
show 13 more comments
12 Answers
12
active
oldest
votes
$begingroup$
JavaScript (ES7), 45 bytes
Fixed thanks to @H.PWiz
Returns $true$ if $a^{b^c} > d^{e^f}$, or $false$ otherwise.
(a,b,c,d,e,f,l=Math.log)=>b**c*l(a)>e**f*l(d)
Try it online!
$endgroup$
1
$begingroup$
Eheh we had the same idea... and almost the same byte count :P
$endgroup$
– digEmAll
14 hours ago
4
$begingroup$
Shouldn't it be(a,b,c,d,e,f)=>b**c*(l=Math.log)(a)>e**f*l(d)? Yours givesfalseforf(2,2,20,2,20,2)
$endgroup$
– H.PWiz
13 hours ago
$begingroup$
@H.PWiz Indeed! Thanks. :)
$endgroup$
– Arnauld
13 hours ago
$begingroup$
Might I suggest a legibility improvement?(a,b,c,d,e,f,l=Math.log)=>b**c*l(a)>e**f*l(d)has the same byte count but is (IMO) a little easier to read.
$endgroup$
– asgallant
7 hours ago
add a comment |
$begingroup$
R, 42 bytes
function(a,b,c,d,e,f)b^c*log(a)>e^f*log(d)
Try it online!
- Fixed the "symmetry problem" thanks to @H.PWiz suggestion
$endgroup$
4
$begingroup$
This is wrong forf(2,2,20,2,20,2)
$endgroup$
– H.PWiz
13 hours ago
$begingroup$
Fixed, using your suggestion to @Arnauld answer ;)
$endgroup$
– digEmAll
13 hours ago
add a comment |
$begingroup$
Perl 6, 27 bytes
*.log* * ** *>*.log* * ** *
Try it online!
Believe it or not, this is not an esolang, even if it is more asterisks than anything else. This uses Arnauld's formula.
$endgroup$
$begingroup$
@Anush, it looked like the footer is taking care of that
$endgroup$
– Shaggy
11 hours ago
add a comment |
$begingroup$
05AB1E, 11 9 11 7 bytes
.²Šm*`›
Port of @Arnauld's JavaScript and @digEmAll's R approaches (I saw them post around the same time)
-2 bytes thanks to @Emigna
+2 bytes as bug-fix after @Arnauld's and @digEmAll's answers contained an error
-4 bytes now that a different input order is allowed after @LuisMendo's comments
Input as [a1,b1], [a3,b3], [a2,b2] as three separated inputs.
Try it online or verify all test cases.
Explanation:
.² # Take the logarithm with base 2 of the implicit [a1,b1]-input
Š # Triple-swap a,b,c to c,a,b with the implicit inputs
# The stack order is now: [log2(a1),log2(b1)], [a2,b2], [a3,b3]
m # Take the power, resulting in [a2**a3,b2**b3]
* # Multiply it with the log2-list, resulting in [log2(a1)*a2**a3,log2(b1)*b2**b3]
` # Push both values separated to the stack
› # And check if log2(a1)*a2**a3 is larger than log2(b1)*b2**b3
# (after which the result is output implicitly)
$endgroup$
1
$begingroup$
You second version can be εć.²š]P`›
$endgroup$
– Emigna
14 hours ago
$begingroup$
@Emigna Ah nice, I was looking at an approach withć, but completely forgot about usingš(not sure why now that I see it, haha). Thanks!
$endgroup$
– Kevin Cruijssen
14 hours ago
$begingroup$
This seems to be incorrect (because Arnauld's answer was incorrect until the recent fix).
$endgroup$
– Anush
13 hours ago
$begingroup$
@Anush Fixed and 4 bytes saved by taking the inputs in a different order now. :)
$endgroup$
– Kevin Cruijssen
12 hours ago
add a comment |
$begingroup$
Java (JDK), 66 bytes
(a,b,c,d,e,f)->Math.log(a)*Math.pow(b,c)>Math.log(d)*Math.pow(e,f)
Try it online!
$endgroup$
add a comment |
$begingroup$
Wolfram Language (Mathematica), 23 bytes
#2^#3Log@#>#5^#6Log@#4&
Try it online!
$endgroup$
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
$begingroup$
@Anush fixed...
$endgroup$
– J42161217
14 hours ago
add a comment |
$begingroup$
05AB1E, 13 bytes
Uses the method from Arnauld's JS answer
2F.²IIm*ˆ}¯`›
Try it online!
$endgroup$
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
1
$begingroup$
@Anush: Seems to terminate in less than a second to me.
$endgroup$
– Emigna
14 hours ago
$begingroup$
you have to set all the variables to 20. See tio.run/##yy9OTMpM/f9f79Du3GK9Q6tzHzXs@v8/2shAB4xiuRBMAA
$endgroup$
– Anush
14 hours ago
$begingroup$
@Anush: Ah, you meantb1=b2=b3=20,yeah that doesn't terminate.
$endgroup$
– Emigna
14 hours ago
1
$begingroup$
@Anush: It is fixed now. Thanks for pointing out my mistake :)
$endgroup$
– Emigna
14 hours ago
|
show 4 more comments
$begingroup$
Excel, 28 bytes
=B1^C1*LOG(A1)>E1^F1*LOG(D1)
Excel implementation of the same formula already used.
$endgroup$
$begingroup$
My understanding is that Excel has 15 digits of precision, so there may be cases where rounding result in this returning the wrong answer.
$endgroup$
– Acccumulation
3 hours ago
add a comment |
$begingroup$
J, 11 9 bytes
>&(^.@^/)
Try it online!
Arguments given as lists.
>is the left one bigger?
&(...)but first, transform each argument thusly:
^.@^/reduce it from the right to the left with exponention. But because ordinary exponentiation will limit error even for extended numbers, we take the logs of both sides
$endgroup$
add a comment |
$begingroup$
Jelly, 8 bytes
Æl×*/}>/
Try it online!
Based on Arnauld’s JS answer. Expects as input [a1, b1] as left argument and [[a2, b2], [a3, b3]] as right argument.
$endgroup$
add a comment |
$begingroup$
TI-BASIC, 27 31 bytes
ln(Ans(1))Ans(2)^Ans(3)>Ans(5)^Ans(6)(ln(Ans(4
Input is a list of length $6$ in Ans.
Outputs true if the first big number is greater than the second big number. Outputs false otherwise.
Examples:
{3,4,5,5,4,3
{3 4 5 5 4 3}
prgmCDGF16
1
{20,20,20,20,20,19 ;these two lines go off-screen
{20 20 20 20 20 19}
prgmCDGF16
1
{3,6,5,5,20,3
{3 6 5 5 20 3}
prgmCDGF16
0
Explanation:
ln(Ans(2))ln(Ans(1))Ans(3)>Ans(6)ln(Ans(5))ln(Ans(4 ;full program
;elements of input denoted as:
; {#1 #2 #3 #4 #5 #6}
ln(Ans(2))ln(Ans(1))Ans(3) ;calculate #3*ln(#2)*ln(#1)
Ans(6)ln(Ans(5))ln(Ans(4 ;calculate #6*ln(#5)*ln(#4)
> ;is the first result greater than the
; second result?
; leave answer in "Ans"
;implicit print of "Ans"
Note: TI-BASIC is a tokenized language. Character count does not equal byte count.
$endgroup$
$begingroup$
I’m not that familiar with TI-BASIC, but this seems to belog(x) × y × zrather thanlog(x) × y ^ z. This won’t necessarily lead to the same ordering as the original inequality.
$endgroup$
– Nick Kennedy
2 hours ago
$begingroup$
@NickKennedy Yes, you are correct about that! I'll update the post to account for this.
$endgroup$
– Tau
1 hour ago
add a comment |
$begingroup$
bc -l, 47 bytes
l(read())*read()^read()>l(read())*read()^read()
with the input read from STDIN, one integer per line.
bc is pretty fast; it handles a=b=c=d=e=f=1,000,000 in a little over a second on my laptop.
$endgroup$
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "200"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f184734%2fwhich-big-number-is-bigger%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
12 Answers
12
active
oldest
votes
12 Answers
12
active
oldest
votes
active
oldest
votes
active
oldest
votes
$begingroup$
JavaScript (ES7), 45 bytes
Fixed thanks to @H.PWiz
Returns $true$ if $a^{b^c} > d^{e^f}$, or $false$ otherwise.
(a,b,c,d,e,f,l=Math.log)=>b**c*l(a)>e**f*l(d)
Try it online!
$endgroup$
1
$begingroup$
Eheh we had the same idea... and almost the same byte count :P
$endgroup$
– digEmAll
14 hours ago
4
$begingroup$
Shouldn't it be(a,b,c,d,e,f)=>b**c*(l=Math.log)(a)>e**f*l(d)? Yours givesfalseforf(2,2,20,2,20,2)
$endgroup$
– H.PWiz
13 hours ago
$begingroup$
@H.PWiz Indeed! Thanks. :)
$endgroup$
– Arnauld
13 hours ago
$begingroup$
Might I suggest a legibility improvement?(a,b,c,d,e,f,l=Math.log)=>b**c*l(a)>e**f*l(d)has the same byte count but is (IMO) a little easier to read.
$endgroup$
– asgallant
7 hours ago
add a comment |
$begingroup$
JavaScript (ES7), 45 bytes
Fixed thanks to @H.PWiz
Returns $true$ if $a^{b^c} > d^{e^f}$, or $false$ otherwise.
(a,b,c,d,e,f,l=Math.log)=>b**c*l(a)>e**f*l(d)
Try it online!
$endgroup$
1
$begingroup$
Eheh we had the same idea... and almost the same byte count :P
$endgroup$
– digEmAll
14 hours ago
4
$begingroup$
Shouldn't it be(a,b,c,d,e,f)=>b**c*(l=Math.log)(a)>e**f*l(d)? Yours givesfalseforf(2,2,20,2,20,2)
$endgroup$
– H.PWiz
13 hours ago
$begingroup$
@H.PWiz Indeed! Thanks. :)
$endgroup$
– Arnauld
13 hours ago
$begingroup$
Might I suggest a legibility improvement?(a,b,c,d,e,f,l=Math.log)=>b**c*l(a)>e**f*l(d)has the same byte count but is (IMO) a little easier to read.
$endgroup$
– asgallant
7 hours ago
add a comment |
$begingroup$
JavaScript (ES7), 45 bytes
Fixed thanks to @H.PWiz
Returns $true$ if $a^{b^c} > d^{e^f}$, or $false$ otherwise.
(a,b,c,d,e,f,l=Math.log)=>b**c*l(a)>e**f*l(d)
Try it online!
$endgroup$
JavaScript (ES7), 45 bytes
Fixed thanks to @H.PWiz
Returns $true$ if $a^{b^c} > d^{e^f}$, or $false$ otherwise.
(a,b,c,d,e,f,l=Math.log)=>b**c*l(a)>e**f*l(d)
Try it online!
edited 2 hours ago
answered 14 hours ago
ArnauldArnauld
82.2k798338
82.2k798338
1
$begingroup$
Eheh we had the same idea... and almost the same byte count :P
$endgroup$
– digEmAll
14 hours ago
4
$begingroup$
Shouldn't it be(a,b,c,d,e,f)=>b**c*(l=Math.log)(a)>e**f*l(d)? Yours givesfalseforf(2,2,20,2,20,2)
$endgroup$
– H.PWiz
13 hours ago
$begingroup$
@H.PWiz Indeed! Thanks. :)
$endgroup$
– Arnauld
13 hours ago
$begingroup$
Might I suggest a legibility improvement?(a,b,c,d,e,f,l=Math.log)=>b**c*l(a)>e**f*l(d)has the same byte count but is (IMO) a little easier to read.
$endgroup$
– asgallant
7 hours ago
add a comment |
1
$begingroup$
Eheh we had the same idea... and almost the same byte count :P
$endgroup$
– digEmAll
14 hours ago
4
$begingroup$
Shouldn't it be(a,b,c,d,e,f)=>b**c*(l=Math.log)(a)>e**f*l(d)? Yours givesfalseforf(2,2,20,2,20,2)
$endgroup$
– H.PWiz
13 hours ago
$begingroup$
@H.PWiz Indeed! Thanks. :)
$endgroup$
– Arnauld
13 hours ago
$begingroup$
Might I suggest a legibility improvement?(a,b,c,d,e,f,l=Math.log)=>b**c*l(a)>e**f*l(d)has the same byte count but is (IMO) a little easier to read.
$endgroup$
– asgallant
7 hours ago
1
1
$begingroup$
Eheh we had the same idea... and almost the same byte count :P
$endgroup$
– digEmAll
14 hours ago
$begingroup$
Eheh we had the same idea... and almost the same byte count :P
$endgroup$
– digEmAll
14 hours ago
4
4
$begingroup$
Shouldn't it be
(a,b,c,d,e,f)=>b**c*(l=Math.log)(a)>e**f*l(d)? Yours gives false for f(2,2,20,2,20,2)$endgroup$
– H.PWiz
13 hours ago
$begingroup$
Shouldn't it be
(a,b,c,d,e,f)=>b**c*(l=Math.log)(a)>e**f*l(d)? Yours gives false for f(2,2,20,2,20,2)$endgroup$
– H.PWiz
13 hours ago
$begingroup$
@H.PWiz Indeed! Thanks. :)
$endgroup$
– Arnauld
13 hours ago
$begingroup$
@H.PWiz Indeed! Thanks. :)
$endgroup$
– Arnauld
13 hours ago
$begingroup$
Might I suggest a legibility improvement?
(a,b,c,d,e,f,l=Math.log)=>b**c*l(a)>e**f*l(d) has the same byte count but is (IMO) a little easier to read.$endgroup$
– asgallant
7 hours ago
$begingroup$
Might I suggest a legibility improvement?
(a,b,c,d,e,f,l=Math.log)=>b**c*l(a)>e**f*l(d) has the same byte count but is (IMO) a little easier to read.$endgroup$
– asgallant
7 hours ago
add a comment |
$begingroup$
R, 42 bytes
function(a,b,c,d,e,f)b^c*log(a)>e^f*log(d)
Try it online!
- Fixed the "symmetry problem" thanks to @H.PWiz suggestion
$endgroup$
4
$begingroup$
This is wrong forf(2,2,20,2,20,2)
$endgroup$
– H.PWiz
13 hours ago
$begingroup$
Fixed, using your suggestion to @Arnauld answer ;)
$endgroup$
– digEmAll
13 hours ago
add a comment |
$begingroup$
R, 42 bytes
function(a,b,c,d,e,f)b^c*log(a)>e^f*log(d)
Try it online!
- Fixed the "symmetry problem" thanks to @H.PWiz suggestion
$endgroup$
4
$begingroup$
This is wrong forf(2,2,20,2,20,2)
$endgroup$
– H.PWiz
13 hours ago
$begingroup$
Fixed, using your suggestion to @Arnauld answer ;)
$endgroup$
– digEmAll
13 hours ago
add a comment |
$begingroup$
R, 42 bytes
function(a,b,c,d,e,f)b^c*log(a)>e^f*log(d)
Try it online!
- Fixed the "symmetry problem" thanks to @H.PWiz suggestion
$endgroup$
R, 42 bytes
function(a,b,c,d,e,f)b^c*log(a)>e^f*log(d)
Try it online!
- Fixed the "symmetry problem" thanks to @H.PWiz suggestion
edited 13 hours ago
answered 14 hours ago
digEmAlldigEmAll
3,704515
3,704515
4
$begingroup$
This is wrong forf(2,2,20,2,20,2)
$endgroup$
– H.PWiz
13 hours ago
$begingroup$
Fixed, using your suggestion to @Arnauld answer ;)
$endgroup$
– digEmAll
13 hours ago
add a comment |
4
$begingroup$
This is wrong forf(2,2,20,2,20,2)
$endgroup$
– H.PWiz
13 hours ago
$begingroup$
Fixed, using your suggestion to @Arnauld answer ;)
$endgroup$
– digEmAll
13 hours ago
4
4
$begingroup$
This is wrong for
f(2,2,20,2,20,2)$endgroup$
– H.PWiz
13 hours ago
$begingroup$
This is wrong for
f(2,2,20,2,20,2)$endgroup$
– H.PWiz
13 hours ago
$begingroup$
Fixed, using your suggestion to @Arnauld answer ;)
$endgroup$
– digEmAll
13 hours ago
$begingroup$
Fixed, using your suggestion to @Arnauld answer ;)
$endgroup$
– digEmAll
13 hours ago
add a comment |
$begingroup$
Perl 6, 27 bytes
*.log* * ** *>*.log* * ** *
Try it online!
Believe it or not, this is not an esolang, even if it is more asterisks than anything else. This uses Arnauld's formula.
$endgroup$
$begingroup$
@Anush, it looked like the footer is taking care of that
$endgroup$
– Shaggy
11 hours ago
add a comment |
$begingroup$
Perl 6, 27 bytes
*.log* * ** *>*.log* * ** *
Try it online!
Believe it or not, this is not an esolang, even if it is more asterisks than anything else. This uses Arnauld's formula.
$endgroup$
$begingroup$
@Anush, it looked like the footer is taking care of that
$endgroup$
– Shaggy
11 hours ago
add a comment |
$begingroup$
Perl 6, 27 bytes
*.log* * ** *>*.log* * ** *
Try it online!
Believe it or not, this is not an esolang, even if it is more asterisks than anything else. This uses Arnauld's formula.
$endgroup$
Perl 6, 27 bytes
*.log* * ** *>*.log* * ** *
Try it online!
Believe it or not, this is not an esolang, even if it is more asterisks than anything else. This uses Arnauld's formula.
answered 11 hours ago
Jo KingJo King
27.6k365133
27.6k365133
$begingroup$
@Anush, it looked like the footer is taking care of that
$endgroup$
– Shaggy
11 hours ago
add a comment |
$begingroup$
@Anush, it looked like the footer is taking care of that
$endgroup$
– Shaggy
11 hours ago
$begingroup$
@Anush, it looked like the footer is taking care of that
$endgroup$
– Shaggy
11 hours ago
$begingroup$
@Anush, it looked like the footer is taking care of that
$endgroup$
– Shaggy
11 hours ago
add a comment |
$begingroup$
05AB1E, 11 9 11 7 bytes
.²Šm*`›
Port of @Arnauld's JavaScript and @digEmAll's R approaches (I saw them post around the same time)
-2 bytes thanks to @Emigna
+2 bytes as bug-fix after @Arnauld's and @digEmAll's answers contained an error
-4 bytes now that a different input order is allowed after @LuisMendo's comments
Input as [a1,b1], [a3,b3], [a2,b2] as three separated inputs.
Try it online or verify all test cases.
Explanation:
.² # Take the logarithm with base 2 of the implicit [a1,b1]-input
Š # Triple-swap a,b,c to c,a,b with the implicit inputs
# The stack order is now: [log2(a1),log2(b1)], [a2,b2], [a3,b3]
m # Take the power, resulting in [a2**a3,b2**b3]
* # Multiply it with the log2-list, resulting in [log2(a1)*a2**a3,log2(b1)*b2**b3]
` # Push both values separated to the stack
› # And check if log2(a1)*a2**a3 is larger than log2(b1)*b2**b3
# (after which the result is output implicitly)
$endgroup$
1
$begingroup$
You second version can be εć.²š]P`›
$endgroup$
– Emigna
14 hours ago
$begingroup$
@Emigna Ah nice, I was looking at an approach withć, but completely forgot about usingš(not sure why now that I see it, haha). Thanks!
$endgroup$
– Kevin Cruijssen
14 hours ago
$begingroup$
This seems to be incorrect (because Arnauld's answer was incorrect until the recent fix).
$endgroup$
– Anush
13 hours ago
$begingroup$
@Anush Fixed and 4 bytes saved by taking the inputs in a different order now. :)
$endgroup$
– Kevin Cruijssen
12 hours ago
add a comment |
$begingroup$
05AB1E, 11 9 11 7 bytes
.²Šm*`›
Port of @Arnauld's JavaScript and @digEmAll's R approaches (I saw them post around the same time)
-2 bytes thanks to @Emigna
+2 bytes as bug-fix after @Arnauld's and @digEmAll's answers contained an error
-4 bytes now that a different input order is allowed after @LuisMendo's comments
Input as [a1,b1], [a3,b3], [a2,b2] as three separated inputs.
Try it online or verify all test cases.
Explanation:
.² # Take the logarithm with base 2 of the implicit [a1,b1]-input
Š # Triple-swap a,b,c to c,a,b with the implicit inputs
# The stack order is now: [log2(a1),log2(b1)], [a2,b2], [a3,b3]
m # Take the power, resulting in [a2**a3,b2**b3]
* # Multiply it with the log2-list, resulting in [log2(a1)*a2**a3,log2(b1)*b2**b3]
` # Push both values separated to the stack
› # And check if log2(a1)*a2**a3 is larger than log2(b1)*b2**b3
# (after which the result is output implicitly)
$endgroup$
1
$begingroup$
You second version can be εć.²š]P`›
$endgroup$
– Emigna
14 hours ago
$begingroup$
@Emigna Ah nice, I was looking at an approach withć, but completely forgot about usingš(not sure why now that I see it, haha). Thanks!
$endgroup$
– Kevin Cruijssen
14 hours ago
$begingroup$
This seems to be incorrect (because Arnauld's answer was incorrect until the recent fix).
$endgroup$
– Anush
13 hours ago
$begingroup$
@Anush Fixed and 4 bytes saved by taking the inputs in a different order now. :)
$endgroup$
– Kevin Cruijssen
12 hours ago
add a comment |
$begingroup$
05AB1E, 11 9 11 7 bytes
.²Šm*`›
Port of @Arnauld's JavaScript and @digEmAll's R approaches (I saw them post around the same time)
-2 bytes thanks to @Emigna
+2 bytes as bug-fix after @Arnauld's and @digEmAll's answers contained an error
-4 bytes now that a different input order is allowed after @LuisMendo's comments
Input as [a1,b1], [a3,b3], [a2,b2] as three separated inputs.
Try it online or verify all test cases.
Explanation:
.² # Take the logarithm with base 2 of the implicit [a1,b1]-input
Š # Triple-swap a,b,c to c,a,b with the implicit inputs
# The stack order is now: [log2(a1),log2(b1)], [a2,b2], [a3,b3]
m # Take the power, resulting in [a2**a3,b2**b3]
* # Multiply it with the log2-list, resulting in [log2(a1)*a2**a3,log2(b1)*b2**b3]
` # Push both values separated to the stack
› # And check if log2(a1)*a2**a3 is larger than log2(b1)*b2**b3
# (after which the result is output implicitly)
$endgroup$
05AB1E, 11 9 11 7 bytes
.²Šm*`›
Port of @Arnauld's JavaScript and @digEmAll's R approaches (I saw them post around the same time)
-2 bytes thanks to @Emigna
+2 bytes as bug-fix after @Arnauld's and @digEmAll's answers contained an error
-4 bytes now that a different input order is allowed after @LuisMendo's comments
Input as [a1,b1], [a3,b3], [a2,b2] as three separated inputs.
Try it online or verify all test cases.
Explanation:
.² # Take the logarithm with base 2 of the implicit [a1,b1]-input
Š # Triple-swap a,b,c to c,a,b with the implicit inputs
# The stack order is now: [log2(a1),log2(b1)], [a2,b2], [a3,b3]
m # Take the power, resulting in [a2**a3,b2**b3]
* # Multiply it with the log2-list, resulting in [log2(a1)*a2**a3,log2(b1)*b2**b3]
` # Push both values separated to the stack
› # And check if log2(a1)*a2**a3 is larger than log2(b1)*b2**b3
# (after which the result is output implicitly)
edited 12 hours ago
answered 14 hours ago
Kevin CruijssenKevin Cruijssen
43.6k573222
43.6k573222
1
$begingroup$
You second version can be εć.²š]P`›
$endgroup$
– Emigna
14 hours ago
$begingroup$
@Emigna Ah nice, I was looking at an approach withć, but completely forgot about usingš(not sure why now that I see it, haha). Thanks!
$endgroup$
– Kevin Cruijssen
14 hours ago
$begingroup$
This seems to be incorrect (because Arnauld's answer was incorrect until the recent fix).
$endgroup$
– Anush
13 hours ago
$begingroup$
@Anush Fixed and 4 bytes saved by taking the inputs in a different order now. :)
$endgroup$
– Kevin Cruijssen
12 hours ago
add a comment |
1
$begingroup$
You second version can be εć.²š]P`›
$endgroup$
– Emigna
14 hours ago
$begingroup$
@Emigna Ah nice, I was looking at an approach withć, but completely forgot about usingš(not sure why now that I see it, haha). Thanks!
$endgroup$
– Kevin Cruijssen
14 hours ago
$begingroup$
This seems to be incorrect (because Arnauld's answer was incorrect until the recent fix).
$endgroup$
– Anush
13 hours ago
$begingroup$
@Anush Fixed and 4 bytes saved by taking the inputs in a different order now. :)
$endgroup$
– Kevin Cruijssen
12 hours ago
1
1
$begingroup$
You second version can be εć.²š]P`›
$endgroup$
– Emigna
14 hours ago
$begingroup$
You second version can be εć.²š]P`›
$endgroup$
– Emigna
14 hours ago
$begingroup$
@Emigna Ah nice, I was looking at an approach with
ć, but completely forgot about using š (not sure why now that I see it, haha). Thanks!$endgroup$
– Kevin Cruijssen
14 hours ago
$begingroup$
@Emigna Ah nice, I was looking at an approach with
ć, but completely forgot about using š (not sure why now that I see it, haha). Thanks!$endgroup$
– Kevin Cruijssen
14 hours ago
$begingroup$
This seems to be incorrect (because Arnauld's answer was incorrect until the recent fix).
$endgroup$
– Anush
13 hours ago
$begingroup$
This seems to be incorrect (because Arnauld's answer was incorrect until the recent fix).
$endgroup$
– Anush
13 hours ago
$begingroup$
@Anush Fixed and 4 bytes saved by taking the inputs in a different order now. :)
$endgroup$
– Kevin Cruijssen
12 hours ago
$begingroup$
@Anush Fixed and 4 bytes saved by taking the inputs in a different order now. :)
$endgroup$
– Kevin Cruijssen
12 hours ago
add a comment |
$begingroup$
Java (JDK), 66 bytes
(a,b,c,d,e,f)->Math.log(a)*Math.pow(b,c)>Math.log(d)*Math.pow(e,f)
Try it online!
$endgroup$
add a comment |
$begingroup$
Java (JDK), 66 bytes
(a,b,c,d,e,f)->Math.log(a)*Math.pow(b,c)>Math.log(d)*Math.pow(e,f)
Try it online!
$endgroup$
add a comment |
$begingroup$
Java (JDK), 66 bytes
(a,b,c,d,e,f)->Math.log(a)*Math.pow(b,c)>Math.log(d)*Math.pow(e,f)
Try it online!
$endgroup$
Java (JDK), 66 bytes
(a,b,c,d,e,f)->Math.log(a)*Math.pow(b,c)>Math.log(d)*Math.pow(e,f)
Try it online!
answered 11 hours ago
Olivier GrégoireOlivier Grégoire
9,53511944
9,53511944
add a comment |
add a comment |
$begingroup$
Wolfram Language (Mathematica), 23 bytes
#2^#3Log@#>#5^#6Log@#4&
Try it online!
$endgroup$
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
$begingroup$
@Anush fixed...
$endgroup$
– J42161217
14 hours ago
add a comment |
$begingroup$
Wolfram Language (Mathematica), 23 bytes
#2^#3Log@#>#5^#6Log@#4&
Try it online!
$endgroup$
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
$begingroup$
@Anush fixed...
$endgroup$
– J42161217
14 hours ago
add a comment |
$begingroup$
Wolfram Language (Mathematica), 23 bytes
#2^#3Log@#>#5^#6Log@#4&
Try it online!
$endgroup$
Wolfram Language (Mathematica), 23 bytes
#2^#3Log@#>#5^#6Log@#4&
Try it online!
edited 14 hours ago
answered 14 hours ago
J42161217J42161217
14.5k21354
14.5k21354
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
$begingroup$
@Anush fixed...
$endgroup$
– J42161217
14 hours ago
add a comment |
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
$begingroup$
@Anush fixed...
$endgroup$
– J42161217
14 hours ago
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
$begingroup$
@Anush fixed...
$endgroup$
– J42161217
14 hours ago
$begingroup$
@Anush fixed...
$endgroup$
– J42161217
14 hours ago
add a comment |
$begingroup$
05AB1E, 13 bytes
Uses the method from Arnauld's JS answer
2F.²IIm*ˆ}¯`›
Try it online!
$endgroup$
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
1
$begingroup$
@Anush: Seems to terminate in less than a second to me.
$endgroup$
– Emigna
14 hours ago
$begingroup$
you have to set all the variables to 20. See tio.run/##yy9OTMpM/f9f79Du3GK9Q6tzHzXs@v8/2shAB4xiuRBMAA
$endgroup$
– Anush
14 hours ago
$begingroup$
@Anush: Ah, you meantb1=b2=b3=20,yeah that doesn't terminate.
$endgroup$
– Emigna
14 hours ago
1
$begingroup$
@Anush: It is fixed now. Thanks for pointing out my mistake :)
$endgroup$
– Emigna
14 hours ago
|
show 4 more comments
$begingroup$
05AB1E, 13 bytes
Uses the method from Arnauld's JS answer
2F.²IIm*ˆ}¯`›
Try it online!
$endgroup$
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
1
$begingroup$
@Anush: Seems to terminate in less than a second to me.
$endgroup$
– Emigna
14 hours ago
$begingroup$
you have to set all the variables to 20. See tio.run/##yy9OTMpM/f9f79Du3GK9Q6tzHzXs@v8/2shAB4xiuRBMAA
$endgroup$
– Anush
14 hours ago
$begingroup$
@Anush: Ah, you meantb1=b2=b3=20,yeah that doesn't terminate.
$endgroup$
– Emigna
14 hours ago
1
$begingroup$
@Anush: It is fixed now. Thanks for pointing out my mistake :)
$endgroup$
– Emigna
14 hours ago
|
show 4 more comments
$begingroup$
05AB1E, 13 bytes
Uses the method from Arnauld's JS answer
2F.²IIm*ˆ}¯`›
Try it online!
$endgroup$
05AB1E, 13 bytes
Uses the method from Arnauld's JS answer
2F.²IIm*ˆ}¯`›
Try it online!
edited 13 hours ago
answered 14 hours ago
EmignaEmigna
48.4k434147
48.4k434147
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
1
$begingroup$
@Anush: Seems to terminate in less than a second to me.
$endgroup$
– Emigna
14 hours ago
$begingroup$
you have to set all the variables to 20. See tio.run/##yy9OTMpM/f9f79Du3GK9Q6tzHzXs@v8/2shAB4xiuRBMAA
$endgroup$
– Anush
14 hours ago
$begingroup$
@Anush: Ah, you meantb1=b2=b3=20,yeah that doesn't terminate.
$endgroup$
– Emigna
14 hours ago
1
$begingroup$
@Anush: It is fixed now. Thanks for pointing out my mistake :)
$endgroup$
– Emigna
14 hours ago
|
show 4 more comments
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
1
$begingroup$
@Anush: Seems to terminate in less than a second to me.
$endgroup$
– Emigna
14 hours ago
$begingroup$
you have to set all the variables to 20. See tio.run/##yy9OTMpM/f9f79Du3GK9Q6tzHzXs@v8/2shAB4xiuRBMAA
$endgroup$
– Anush
14 hours ago
$begingroup$
@Anush: Ah, you meantb1=b2=b3=20,yeah that doesn't terminate.
$endgroup$
– Emigna
14 hours ago
1
$begingroup$
@Anush: It is fixed now. Thanks for pointing out my mistake :)
$endgroup$
– Emigna
14 hours ago
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
$begingroup$
This doesn't terminate for a1=20, a2=20, a3=20.
$endgroup$
– Anush
14 hours ago
1
1
$begingroup$
@Anush: Seems to terminate in less than a second to me.
$endgroup$
– Emigna
14 hours ago
$begingroup$
@Anush: Seems to terminate in less than a second to me.
$endgroup$
– Emigna
14 hours ago
$begingroup$
you have to set all the variables to 20. See tio.run/##yy9OTMpM/f9f79Du3GK9Q6tzHzXs@v8/2shAB4xiuRBMAA
$endgroup$
– Anush
14 hours ago
$begingroup$
you have to set all the variables to 20. See tio.run/##yy9OTMpM/f9f79Du3GK9Q6tzHzXs@v8/2shAB4xiuRBMAA
$endgroup$
– Anush
14 hours ago
$begingroup$
@Anush: Ah, you meant
b1=b2=b3=20 ,yeah that doesn't terminate.$endgroup$
– Emigna
14 hours ago
$begingroup$
@Anush: Ah, you meant
b1=b2=b3=20 ,yeah that doesn't terminate.$endgroup$
– Emigna
14 hours ago
1
1
$begingroup$
@Anush: It is fixed now. Thanks for pointing out my mistake :)
$endgroup$
– Emigna
14 hours ago
$begingroup$
@Anush: It is fixed now. Thanks for pointing out my mistake :)
$endgroup$
– Emigna
14 hours ago
|
show 4 more comments
$begingroup$
Excel, 28 bytes
=B1^C1*LOG(A1)>E1^F1*LOG(D1)
Excel implementation of the same formula already used.
$endgroup$
$begingroup$
My understanding is that Excel has 15 digits of precision, so there may be cases where rounding result in this returning the wrong answer.
$endgroup$
– Acccumulation
3 hours ago
add a comment |
$begingroup$
Excel, 28 bytes
=B1^C1*LOG(A1)>E1^F1*LOG(D1)
Excel implementation of the same formula already used.
$endgroup$
$begingroup$
My understanding is that Excel has 15 digits of precision, so there may be cases where rounding result in this returning the wrong answer.
$endgroup$
– Acccumulation
3 hours ago
add a comment |
$begingroup$
Excel, 28 bytes
=B1^C1*LOG(A1)>E1^F1*LOG(D1)
Excel implementation of the same formula already used.
$endgroup$
Excel, 28 bytes
=B1^C1*LOG(A1)>E1^F1*LOG(D1)
Excel implementation of the same formula already used.
answered 10 hours ago
WernischWernisch
1,708317
1,708317
$begingroup$
My understanding is that Excel has 15 digits of precision, so there may be cases where rounding result in this returning the wrong answer.
$endgroup$
– Acccumulation
3 hours ago
add a comment |
$begingroup$
My understanding is that Excel has 15 digits of precision, so there may be cases where rounding result in this returning the wrong answer.
$endgroup$
– Acccumulation
3 hours ago
$begingroup$
My understanding is that Excel has 15 digits of precision, so there may be cases where rounding result in this returning the wrong answer.
$endgroup$
– Acccumulation
3 hours ago
$begingroup$
My understanding is that Excel has 15 digits of precision, so there may be cases where rounding result in this returning the wrong answer.
$endgroup$
– Acccumulation
3 hours ago
add a comment |
$begingroup$
J, 11 9 bytes
>&(^.@^/)
Try it online!
Arguments given as lists.
>is the left one bigger?
&(...)but first, transform each argument thusly:
^.@^/reduce it from the right to the left with exponention. But because ordinary exponentiation will limit error even for extended numbers, we take the logs of both sides
$endgroup$
add a comment |
$begingroup$
J, 11 9 bytes
>&(^.@^/)
Try it online!
Arguments given as lists.
>is the left one bigger?
&(...)but first, transform each argument thusly:
^.@^/reduce it from the right to the left with exponention. But because ordinary exponentiation will limit error even for extended numbers, we take the logs of both sides
$endgroup$
add a comment |
$begingroup$
J, 11 9 bytes
>&(^.@^/)
Try it online!
Arguments given as lists.
>is the left one bigger?
&(...)but first, transform each argument thusly:
^.@^/reduce it from the right to the left with exponention. But because ordinary exponentiation will limit error even for extended numbers, we take the logs of both sides
$endgroup$
J, 11 9 bytes
>&(^.@^/)
Try it online!
Arguments given as lists.
>is the left one bigger?
&(...)but first, transform each argument thusly:
^.@^/reduce it from the right to the left with exponention. But because ordinary exponentiation will limit error even for extended numbers, we take the logs of both sides
edited 9 hours ago
answered 10 hours ago
JonahJonah
3,0381019
3,0381019
add a comment |
add a comment |
$begingroup$
Jelly, 8 bytes
Æl×*/}>/
Try it online!
Based on Arnauld’s JS answer. Expects as input [a1, b1] as left argument and [[a2, b2], [a3, b3]] as right argument.
$endgroup$
add a comment |
$begingroup$
Jelly, 8 bytes
Æl×*/}>/
Try it online!
Based on Arnauld’s JS answer. Expects as input [a1, b1] as left argument and [[a2, b2], [a3, b3]] as right argument.
$endgroup$
add a comment |
$begingroup$
Jelly, 8 bytes
Æl×*/}>/
Try it online!
Based on Arnauld’s JS answer. Expects as input [a1, b1] as left argument and [[a2, b2], [a3, b3]] as right argument.
$endgroup$
Jelly, 8 bytes
Æl×*/}>/
Try it online!
Based on Arnauld’s JS answer. Expects as input [a1, b1] as left argument and [[a2, b2], [a3, b3]] as right argument.
edited 4 hours ago
answered 4 hours ago
Nick KennedyNick Kennedy
1,91149
1,91149
add a comment |
add a comment |
$begingroup$
TI-BASIC, 27 31 bytes
ln(Ans(1))Ans(2)^Ans(3)>Ans(5)^Ans(6)(ln(Ans(4
Input is a list of length $6$ in Ans.
Outputs true if the first big number is greater than the second big number. Outputs false otherwise.
Examples:
{3,4,5,5,4,3
{3 4 5 5 4 3}
prgmCDGF16
1
{20,20,20,20,20,19 ;these two lines go off-screen
{20 20 20 20 20 19}
prgmCDGF16
1
{3,6,5,5,20,3
{3 6 5 5 20 3}
prgmCDGF16
0
Explanation:
ln(Ans(2))ln(Ans(1))Ans(3)>Ans(6)ln(Ans(5))ln(Ans(4 ;full program
;elements of input denoted as:
; {#1 #2 #3 #4 #5 #6}
ln(Ans(2))ln(Ans(1))Ans(3) ;calculate #3*ln(#2)*ln(#1)
Ans(6)ln(Ans(5))ln(Ans(4 ;calculate #6*ln(#5)*ln(#4)
> ;is the first result greater than the
; second result?
; leave answer in "Ans"
;implicit print of "Ans"
Note: TI-BASIC is a tokenized language. Character count does not equal byte count.
$endgroup$
$begingroup$
I’m not that familiar with TI-BASIC, but this seems to belog(x) × y × zrather thanlog(x) × y ^ z. This won’t necessarily lead to the same ordering as the original inequality.
$endgroup$
– Nick Kennedy
2 hours ago
$begingroup$
@NickKennedy Yes, you are correct about that! I'll update the post to account for this.
$endgroup$
– Tau
1 hour ago
add a comment |
$begingroup$
TI-BASIC, 27 31 bytes
ln(Ans(1))Ans(2)^Ans(3)>Ans(5)^Ans(6)(ln(Ans(4
Input is a list of length $6$ in Ans.
Outputs true if the first big number is greater than the second big number. Outputs false otherwise.
Examples:
{3,4,5,5,4,3
{3 4 5 5 4 3}
prgmCDGF16
1
{20,20,20,20,20,19 ;these two lines go off-screen
{20 20 20 20 20 19}
prgmCDGF16
1
{3,6,5,5,20,3
{3 6 5 5 20 3}
prgmCDGF16
0
Explanation:
ln(Ans(2))ln(Ans(1))Ans(3)>Ans(6)ln(Ans(5))ln(Ans(4 ;full program
;elements of input denoted as:
; {#1 #2 #3 #4 #5 #6}
ln(Ans(2))ln(Ans(1))Ans(3) ;calculate #3*ln(#2)*ln(#1)
Ans(6)ln(Ans(5))ln(Ans(4 ;calculate #6*ln(#5)*ln(#4)
> ;is the first result greater than the
; second result?
; leave answer in "Ans"
;implicit print of "Ans"
Note: TI-BASIC is a tokenized language. Character count does not equal byte count.
$endgroup$
$begingroup$
I’m not that familiar with TI-BASIC, but this seems to belog(x) × y × zrather thanlog(x) × y ^ z. This won’t necessarily lead to the same ordering as the original inequality.
$endgroup$
– Nick Kennedy
2 hours ago
$begingroup$
@NickKennedy Yes, you are correct about that! I'll update the post to account for this.
$endgroup$
– Tau
1 hour ago
add a comment |
$begingroup$
TI-BASIC, 27 31 bytes
ln(Ans(1))Ans(2)^Ans(3)>Ans(5)^Ans(6)(ln(Ans(4
Input is a list of length $6$ in Ans.
Outputs true if the first big number is greater than the second big number. Outputs false otherwise.
Examples:
{3,4,5,5,4,3
{3 4 5 5 4 3}
prgmCDGF16
1
{20,20,20,20,20,19 ;these two lines go off-screen
{20 20 20 20 20 19}
prgmCDGF16
1
{3,6,5,5,20,3
{3 6 5 5 20 3}
prgmCDGF16
0
Explanation:
ln(Ans(2))ln(Ans(1))Ans(3)>Ans(6)ln(Ans(5))ln(Ans(4 ;full program
;elements of input denoted as:
; {#1 #2 #3 #4 #5 #6}
ln(Ans(2))ln(Ans(1))Ans(3) ;calculate #3*ln(#2)*ln(#1)
Ans(6)ln(Ans(5))ln(Ans(4 ;calculate #6*ln(#5)*ln(#4)
> ;is the first result greater than the
; second result?
; leave answer in "Ans"
;implicit print of "Ans"
Note: TI-BASIC is a tokenized language. Character count does not equal byte count.
$endgroup$
TI-BASIC, 27 31 bytes
ln(Ans(1))Ans(2)^Ans(3)>Ans(5)^Ans(6)(ln(Ans(4
Input is a list of length $6$ in Ans.
Outputs true if the first big number is greater than the second big number. Outputs false otherwise.
Examples:
{3,4,5,5,4,3
{3 4 5 5 4 3}
prgmCDGF16
1
{20,20,20,20,20,19 ;these two lines go off-screen
{20 20 20 20 20 19}
prgmCDGF16
1
{3,6,5,5,20,3
{3 6 5 5 20 3}
prgmCDGF16
0
Explanation:
ln(Ans(2))ln(Ans(1))Ans(3)>Ans(6)ln(Ans(5))ln(Ans(4 ;full program
;elements of input denoted as:
; {#1 #2 #3 #4 #5 #6}
ln(Ans(2))ln(Ans(1))Ans(3) ;calculate #3*ln(#2)*ln(#1)
Ans(6)ln(Ans(5))ln(Ans(4 ;calculate #6*ln(#5)*ln(#4)
> ;is the first result greater than the
; second result?
; leave answer in "Ans"
;implicit print of "Ans"
Note: TI-BASIC is a tokenized language. Character count does not equal byte count.
edited 44 mins ago
answered 10 hours ago
TauTau
1,128519
1,128519
$begingroup$
I’m not that familiar with TI-BASIC, but this seems to belog(x) × y × zrather thanlog(x) × y ^ z. This won’t necessarily lead to the same ordering as the original inequality.
$endgroup$
– Nick Kennedy
2 hours ago
$begingroup$
@NickKennedy Yes, you are correct about that! I'll update the post to account for this.
$endgroup$
– Tau
1 hour ago
add a comment |
$begingroup$
I’m not that familiar with TI-BASIC, but this seems to belog(x) × y × zrather thanlog(x) × y ^ z. This won’t necessarily lead to the same ordering as the original inequality.
$endgroup$
– Nick Kennedy
2 hours ago
$begingroup$
@NickKennedy Yes, you are correct about that! I'll update the post to account for this.
$endgroup$
– Tau
1 hour ago
$begingroup$
I’m not that familiar with TI-BASIC, but this seems to be
log(x) × y × z rather than log(x) × y ^ z. This won’t necessarily lead to the same ordering as the original inequality.$endgroup$
– Nick Kennedy
2 hours ago
$begingroup$
I’m not that familiar with TI-BASIC, but this seems to be
log(x) × y × z rather than log(x) × y ^ z. This won’t necessarily lead to the same ordering as the original inequality.$endgroup$
– Nick Kennedy
2 hours ago
$begingroup$
@NickKennedy Yes, you are correct about that! I'll update the post to account for this.
$endgroup$
– Tau
1 hour ago
$begingroup$
@NickKennedy Yes, you are correct about that! I'll update the post to account for this.
$endgroup$
– Tau
1 hour ago
add a comment |
$begingroup$
bc -l, 47 bytes
l(read())*read()^read()>l(read())*read()^read()
with the input read from STDIN, one integer per line.
bc is pretty fast; it handles a=b=c=d=e=f=1,000,000 in a little over a second on my laptop.
$endgroup$
add a comment |
$begingroup$
bc -l, 47 bytes
l(read())*read()^read()>l(read())*read()^read()
with the input read from STDIN, one integer per line.
bc is pretty fast; it handles a=b=c=d=e=f=1,000,000 in a little over a second on my laptop.
$endgroup$
add a comment |
$begingroup$
bc -l, 47 bytes
l(read())*read()^read()>l(read())*read()^read()
with the input read from STDIN, one integer per line.
bc is pretty fast; it handles a=b=c=d=e=f=1,000,000 in a little over a second on my laptop.
$endgroup$
bc -l, 47 bytes
l(read())*read()^read()>l(read())*read()^read()
with the input read from STDIN, one integer per line.
bc is pretty fast; it handles a=b=c=d=e=f=1,000,000 in a little over a second on my laptop.
answered 2 mins ago
AbigailAbigail
50617
50617
add a comment |
add a comment |
If this is an answer to a challenge…
…Be sure to follow the challenge specification. However, please refrain from exploiting obvious loopholes. Answers abusing any of the standard loopholes are considered invalid. If you think a specification is unclear or underspecified, comment on the question instead.
…Try to optimize your score. For instance, answers to code-golf challenges should attempt to be as short as possible. You can always include a readable version of the code in addition to the competitive one.
Explanations of your answer make it more interesting to read and are very much encouraged.…Include a short header which indicates the language(s) of your code and its score, as defined by the challenge.
More generally…
…Please make sure to answer the question and provide sufficient detail.
…Avoid asking for help, clarification or responding to other answers (use comments instead).
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
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fcodegolf.stackexchange.com%2fquestions%2f184734%2fwhich-big-number-is-bigger%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
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
Required, but never shown
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
Required, but never shown
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
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
5
$begingroup$
It would probably also benefit from normal, broadly-defined decision-problem output instead of being restricted to
1and0$endgroup$
– Unrelated String
14 hours ago
2
$begingroup$
Can we take the inputs in any order?
$endgroup$
– Kevin Cruijssen
14 hours ago
6
$begingroup$
@Anush Imposing a specific order of inputs it not common at all. You should specify that very clearly in the text. By default imput order and format are flexible
$endgroup$
– Luis Mendo
14 hours ago
1
$begingroup$
@Anush The question cannot always be correct. If floating-point limitations are not allowed, the code will have to use integers, or big integers, or symbolic math. Each of those eventually fail (due to data-type or memory limitations) for big enough inputs
$endgroup$
– Luis Mendo
13 hours ago
2
$begingroup$
@Anush Great, -4 bytes in that case :) You might want to edit the rules mentioned in the comments to the challenge description.
$endgroup$
– Kevin Cruijssen
12 hours ago