[ 3 / biz / cgl / ck / diy / fa / g / ic / jp / lit / sci / tg / vr ] [ index / top / reports / report a bug ] [ 4plebs / archived.moe / rbt ]

# /sci/ - Science & Math

[ Toggle deleted replies ]
File: 14 KB, 261x467, 543254325324.png [View same] [iqdb] [saucenao] [google] [report]
No.9766284 [Reply] [Original] [archived.moe]

 >> Anonymous Fri May 25 11:23:16 2018 No.9766293 >>9766284Max if distinct, duplicates with multiplicity otherwise.
 >> Anonymous Fri May 25 11:23:31 2018 No.9766296 not science or math
 >> Anonymous Fri May 25 11:29:18 2018 No.9766306 >>9766284a waste of time and code, most programming languages should have something like a "max" function that returns the largest value in an array
 >> Anonymous Fri May 25 11:32:57 2018 No.9766312 >>9766284Is this really the most efficient way to write that function?
 >> Anonymous Fri May 25 11:38:43 2018 No.9766323 >>9766312For modern computers, it's way less lines of code to just sort them and output the final value in the array. It's only three numbers and a bubble sort is better.
 >> Anonymous Fri May 25 12:25:39 2018 No.9766398 File: 16 KB, 480x368, deeply concerned.jpg [View same] [iqdb] [saucenao] [google] [report] >>9766284AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA
 >> Anonymous Fri May 25 12:27:00 2018 No.9766404 int ret_max (int a, int b){ if(a>b) return a; return b;}int ret_max(int a, int b, int c){ return ret_max(a, ret_max(b,c));}//This good enough?
 >> Anonymous Fri May 25 12:27:45 2018 No.9766407 >>9766312Absolutely not. It's a thoroughly retarded way of doing it. It's also plain wrong.
 >> Acbn !7CUUUUUUUU Fri May 25 12:29:29 2018 No.9766410 How in the world is that a valid typing for a case statementPerhaps I need to look at Python more, that's wild
 >> Anonymous Fri May 25 12:34:32 2018 No.9766419 >>9766404int max(int a, int b) return (a>b)?a:b;int max3(int a, int b, int c) return max(a, max(b, c));But this version isn't equivalent to the abomination in OP.
 >> Anonymous Fri May 25 12:35:53 2018 No.9766424 bool opFaggot = true
 >> Anonymous Fri May 25 12:37:19 2018 No.9766430 >>9766284Also, it's just plain wrong, isn't it?I mean>if x==y>return [x, y]nothing about that implies that they are larger than z. for {x=1,y=1,z=15} this fails to return the largest.
 >> Anonymous Fri May 25 12:41:36 2018 No.9766442 >>9766323you can just write three if statements using 'and' and output the final value, or is that less efficient?
 >> Anonymous Fri May 25 12:43:22 2018 No.9766446 >>9766404templateconstexpr std::common_type_t max(T1 a, T2 b){return a>b ? a : b;}templateconstexpr auto max(T1 a, T2 b, Ts... cs){return max(max(a, b), cs...);}//this is better :^)
 >> Anonymous Fri May 25 12:45:12 2018 No.9766449 >>9766410python doesn't have case/switch style flow control. the closest it has is packaging possible values as keys in a dictionary and then indexing the dictionary with your inputsee: https://bytebaker.com/2008/11/03/switch-case-statement-in-python/why doesn't it have proper case switching? probably the same reason it doesn't have do/while and lambdas are hamstrung: the developers think the syntax you'd need is ugly or unpythonic so they refuse to implement it
 >> Anonymous Fri May 25 21:59:06 2018 No.9767585 >>9766306If you had read the function, you would realize it doesn't just calculate the max.Or maybe you just meant that the bottom 6 cases should have been replaced with return max(x, y, z), which is probably true.
 >> Anonymous Fri May 25 22:07:42 2018 No.9767601 >>9767585It's still sloppy cause it's not upgradable code. Add a W or more variables and you have to recode everything with an exponentially growing code.
 >> Anonymous Fri May 25 22:32:43 2018 No.9767633 >>9766284>largest(5,5,10e6)returns 5
 >> Anonymous Fri May 25 23:01:34 2018 No.9767678 >>9767633Actually it returns [5, 5]
 >> Anonymous Fri May 25 23:17:34 2018 No.9767694 >>9766284shit-tier codefuck off, pajeet
 >> Anonymous Fri May 25 23:37:55 2018 No.9767725 >>9766284def largest(x, y, z): return max([x, y, z])
 >> Anonymous Sat May 26 00:01:53 2018 No.9767758 >>9767725Doesn't replicate the function's behavior, returning any duplicates takes precedence over returning max.
 >> Anonymous Sat May 26 00:08:59 2018 No.9767764 File: 86 KB, 1920x1080, maxresdefault.jpg [View same] [iqdb] [saucenao] [google] [report] >>9766284Numale-tier language
 >> Anonymous Sat May 26 01:54:14 2018 No.9767899 unpythonicdef largest(*args): return [x for x in args if x>=max(args)]
 >> Anonymous Sat May 26 02:13:54 2018 No.9767927 >>9766410Python is dynamically typed
 >> Anonymous Sat May 26 02:24:19 2018 No.9767929 >>9767601Best bet would probably be just to do max(array) and then count the number of entries that have that value. Replicates all behavior and doesn't have a retarded else if tree.
 >> Anonymous Sat May 26 03:58:27 2018 No.9768000 >>9766449Python does have a "while" loop.
 >> Anonymous Sat May 26 04:22:46 2018 No.9768026 def largest(array): return filter(lambda x, max_x=max(array): x == max_x, array)>His language of choice can't solve it with one-liner
 >> Anonymous Sat May 26 07:32:14 2018 No.9768272 >>9766284Black, white, green, and red
 >> Anonymous Sat May 26 07:41:08 2018 No.9768288 >>9766312No but what do you expect of cs majors?$\rmdef ~ largest(x,~y,~z): \\~~~if ~ x == y: \\~~~~~~if ~ y==z: ~ return ~ [x,~y,~z]; \\~~~~~~return ~[x,~y]; \\~~~if ~ y==z: ~ return ~ [y,~z]; \\~~~if ~ x>y: \\~~~~~~if ~ x>z: ~ return ~ x; \\~~~~~~return ~ z; \\~~~if ~ y>z: ~ return ~y; \\~~~return ~ z; \\$
 >> Anonymous Sat May 26 09:35:45 2018 No.9768459 >>9768288>writes an equally shitty and broken functionyou're a cs major too i take it?>>9767899this guy gets it
 >> Anonymous Sat May 26 09:42:21 2018 No.9768466 >>9768459>not understanding preserving behavior
 >> Anonymous Sat May 26 09:44:26 2018 No.9768468 >>9768000You didn't read. I said "do/while". It's a while loop that checks its exit conditions at the end of the loop instead of the start.
 >> Anonymous Sat May 26 09:50:39 2018 No.9768483 >>9766449>the closest it has is packaging possible values as keys in a dictionary and then indexing the dictionary with your inputThat's what gcc does with a switch statement anyway.
 >> Anonymous Sat May 26 10:18:01 2018 No.9768551 >>9766284is that python or what is it
 >> Anonymous Sat May 26 10:24:02 2018 No.9768561 >>9768288How does it feel to be retarded?
 >> Anonymous Sat May 26 10:35:02 2018 No.9768585 >>9766284The result of years of idiot programmers who hate mathematics, telling people who hate mathematics and want to get into programming "no, you don't need mathematics in programming".
 >> Anonymous Sat May 26 11:04:11 2018 No.9768680   >>9766293this>>9766312it actually might be, even though it's ugly. remember that python does lazy boolean evaluations, and that you'd probably have to evaluate most of those comparisons in a sorting algorithm anyway. calling sort() or other other methods also involves overhead. you could in-line a sorting algorithm, but i think it's most efficient as op wrote it.
 >> Anonymous Sat May 26 11:05:43 2018 No.9768683 >>9766293this>>9766312it actually might be, even though it's ugly. you'd probably have to evaluate most of those comparisons in the worst case of a sorting algorithm anyway. calling sort() or other other methods also involves overhead. you could in-line a sorting algorithm, but i think it's most efficient as op wrote it.
 >> Anonymous Sat May 26 11:19:15 2018 No.9768724 >>9768483Yeah but you don't have to write the dictionary yourself.
 >> Anonymous Sat May 26 11:22:33 2018 No.9768735 >>9768683>you'd probably have to evaluate most of those comparisons in the worst case of a sorting algorithm anyway.cont.or at least for fixed n=3, it's probably not terribly inefficient. to implement a general sorting algorithm, you'd have to set up another list object, which might not be worth it if you're only comparing three numbers. might be able to cut out a few of those comparisons, but the OPs function is hardly the worst way to do this if you're really only ever going to have three inputs.
 >> Anonymous Sat May 26 12:16:25 2018 No.9768823 >>9768288of course, this is the cleanest way.
 >> Anonymous Sat May 26 13:02:35 2018 No.9768905 A defined functiin which takes 3 int variables and checks to see if they are equal and if not which is the greatest, returning the largest variable or variables
 >> Anonymous Sat May 26 14:52:18 2018 No.9769165 >>9766312as written the proper way to do it is >>9768288 which takes 3 comparisons on average to complete>>9767601as retarded as it sounds sometime it's acceptable to overload the same function multiple times when the generalization is less efficient for small or special input sizes
 >> Anonymous Sat May 26 15:05:21 2018 No.9769193 >>9768683Don't be stupid. The function isn't just inefficient, its output is wrong.
 >> Anonymous Sat May 26 15:44:18 2018 No.9769282   >>9766284Retarded
 >> Anonymous Sat May 26 15:49:43 2018 No.9769296   File: 9 KB, 211x239, 1513971000563.png [View same] [iqdb] [saucenao] [google] [report] >>9767758>largest()>"I-it's meant to l-look for duplicates..."
 >> Anonymous Sat May 26 15:51:56 2018 No.9769300   >>9768468Whats the benefit of that. You can exit anywhere at any time in any kind of loop with break.
 >> Anonymous Sat May 26 15:57:29 2018 No.9769314 >>9766284CS capstone project
 >> Anonymous Sat May 26 15:57:31 2018 No.9769315 >>9766323You don't even need to sort the list.You can pass through the unsorted list just once and keep track of the largest element as well as the multiplicity.O(n) is better than O(nlog(n))I know it doesn't matter for 3 elements but for larger lists, sorting is a waste.
 >> Anonymous Sat May 26 17:19:46 2018 No.9769538 array[array==max(array)]R is cutest language
 >> Anonymous Sat May 26 19:30:20 2018 No.9769844 >>9768468This behavior can be achieved with a while/else loop and half a brain
 >> Anonymous Sat May 26 19:31:54 2018 No.9769846 >>9768724Yeah but you can use anything as a key, so its more like pattern matching
 >> Anonymous Sat May 26 19:32:57 2018 No.9769848 >>9769538APLs don't count for problems like this, the sheer terseness and expressability is unfair
 >> Anonymous Sat May 26 19:39:33 2018 No.9769862 File: 30 KB, 311x429, cs graduate.png [View same] [iqdb] [saucenao] [google] [report]
 >> Anonymous Sat May 26 19:43:58 2018 No.9769874 >>9766284What is the output oflargest (9, 7, 7)?
 >> Instant Creation Sat May 26 19:51:40 2018 No.9769890 >>9769874The output would be: [y, z]
 >> Anonymous Sat May 26 19:57:05 2018 No.9769909 >>9769890Yeah, I mistakenly assumed the code was wanting to return the largest number.
 >> Anonymous Sat May 26 20:16:29 2018 No.9769942 File: 169 KB, 272x338, sck.png [View same] [iqdb] [saucenao] [google] [report] >>9769909No, obviously there is no largest if any two elements are equal and therefor it would be quite illogical to assume that condition can not happen. The code is just covering all of the bases.
 >> Anonymous Sat May 26 20:39:20 2018 No.9769984 >>9768288Is this bait?What if x==z.?Fucking baboon, next time you shit on the best major in the univserse kys.
 >> Anonymous Sat May 26 20:46:02 2018 No.9769997 >>9766312max([x,y,z]) and it’s a built in function for python
 >> Anonymous Sat May 26 20:53:27 2018 No.9770004 >>97699970/10, only returns singular values even if multiple values match the maximum
 >> Anonymous Sat May 26 20:55:31 2018 No.9770009 Retarded.Why would you return a string if there is only one but a list of there are multiple? Wouldn't you want the same object type regardless?$>>> def largest(x,y,z):... l = max([x,y,z])... return [l] * [x,y,z].count(l)...>>> print(largest(3,2,3))[3, 3]$Or for your retarded version$>>> def largest(x,y,z):... l = max([x,y,z])... if [x,y,z].count(l) > 1:... return [l] * [x,y,z].count(l)... else:... return l...>>> print(largest(3,2,1))3$
 >> Anonymous Sat May 26 21:01:05 2018 No.9770014 >>9769844of course it can. it's also a kludge and it requires you to declare it as [while True:], which is just bad practice, and requiring the user to manually control the loop logic with an if block at the end of the loop is just asking for bugs>>9769300it's useful any time you want your exit conditions to be dependent on the state of a variable created during the loop. if your loops always check at the start of the loop, you have a couple major options:1. perform a single round of the loop outside the loop so the variable exists and is queued up for the first loop pass.2. put an if/break statement at the end of the loop3. use a flag variable that gets checked and modified as necessary at the end of the loopNone of these cases are ideal. 1 duplicates your work, always a bad idea. 2 and 3 are two means to the same basic end, and they both work, but you're cluttering up your code unnecessarily.it's a niche issue, certainly, but it's not one without its uses
 >> Anonymous Sat May 26 21:03:41 2018 No.9770019 >>9770014and to sum it up even more simply: A do-while block ensures that the encapsulated code is always executed at least once, while you cannot make assumptions about whether the content of a while-do block has been executed.
 >> Anonymous Sat May 26 21:05:55 2018 No.9770024 File: 4 KB, 259x194, 1111.jpg [View same] [iqdb] [saucenao] [google] [report] >>9770019spaghetti monster.Only use for loops.
 >> Anonymous Sun May 27 00:31:57 2018 No.9770298 File: 25 KB, 720x304, Star_Wars_The_Force_Awakens_2015_HD-CAM_XViD_HQMic_AC3-CPG.avi_snapshot_01.48.02_[2015.12.23_21.18.13].jpg [View same] [iqdb] [saucenao] [google] [report] >mfw /sci/ doesn't do things the pythonic way
 >> Anonymous Sun May 27 01:01:22 2018 No.9770336 >>9766284answer = x ;if answer < y { answer = y } ;if answer < z { answer = z } ;Boring and simple, but effective and accurate. If you must, you can include a count of how many had the same value, or save the names of the largest values, by simple modification of that code.
 >> Anonymous Sun May 27 12:11:28 2018 No.9771315 >>9769165>as retarded as it sounds sometime it's acceptable to overload the same function multiple times when the generalization is less efficient for small or special input sizesthis. but there's so much overhead in python anyway it's probably not worth it. i know it's a stupid nonsense function that op wrote, but it might actually be better if they used a tuple containing the number and its multiplicity.
 >> Anonymous Sun May 27 12:49:52 2018 No.9771393 >>9768466>not understanding the joke
 >> Anonymous Sun May 27 14:16:16 2018 No.9771571 >>9766284A function which compares the values of three variables, and returns the largest. For variables with tied values, it returns a list including both of them. I'd be worried about the parsing of the x == y == z case, as it might actually check if x == true if Python doesn't support the syntax he used.Looks like it uses an "elif" at the end instead of an else. In the case that elif is actually necessary, which I doubt, an else should be put below it to throw an error so the code returns the same type every time. >>9766312Functionally? Yes, though it's ugly. >>9766306>>9766442Won't do the same thing.>>9768288>duplicate y == z check>doesn't even check all casesThe code in OP is superior, engie.
 >> Anonymous Sun May 27 15:02:04 2018 No.9771640 >>9769862this.
 >> Anonymous Sun May 27 15:06:27 2018 No.9771650 What bothers me most isn't the poor style or unnecessary if statements, it's that the return type isn't predictable.
 >> Anonymous Sun May 27 17:18:54 2018 No.9771883 >>9766284>return type changes based on arguments
 >> Anonymous Sun May 27 17:34:58 2018 No.9771912 >>9771650This. You have to check if it's a str or list after every return. That's why the first example in >>9770009 is the best answer.
 >> Anonymous Sun May 27 17:48:21 2018 No.9771943   >>9770024>>9770019Yes this is dumb.Use for loops for every possible situation reliant on number analysis. Use while loops for situations where you want a result without knowing how many steps it will take to get it, so while(!known){... if (satisfying condition){ known = true; }}accomplishes just about anything you'd need in While looping.
 >> Anonymous Sun May 27 17:57:12 2018 No.9771958   >>9766284There is little value in returning a list of duplicates. If you just simply return a single largest value, you get an answer. If you return duplicate largest values, there is no index indentity for the values from the original input, so you still only have one usable answer. Sure, X and Z were both the largest, but the return doesn't say which one is X and which one is Z, so its irrelevant to the scope of the function to return duplicates when the return is just [largest, largest]If the OP code was meant to perform a useful function, it doesn't and is shit.
 >> Anonymous Sun May 27 17:59:32 2018 No.9771965 >>9771883>>return type changes based on argumentsPerl (which this isn't) can do this.Technically, Perl functions always return an array, just it's usually empty or has only one element.
 >> Anonymous Sun May 27 18:26:59 2018 No.9772028   >>9766284Why wouldn't you just write the function to take a list of arguments. float largest(float[] values){》float check;》float max;》for (int i=0; i
 >> Anonymous Sun May 27 18:31:08 2018 No.9772036   >>9772028float largest(float[] values){》float check;》float max;》for (int i=0; i
 >> Anonymous Sun May 27 18:32:29 2018 No.9772042   float largest(float[] values){》float check;》float max;》for (int i=0; i
 >> Anonymous Sun May 27 18:41:05 2018 No.9772059 >>9771943Come the fuck on.This:do { commands} while (condition = True)is really less preferable to this?while (flag) { commands if (condition = True) { flag = False } }If you seriously think the second is better, you're an idiot.
 >> Anonymous Sun May 27 18:44:05 2018 No.9772068 File: 1.03 MB, 1019x746, 1526516994940.png [View same] [iqdb] [saucenao] [google] [report] >{
 >> Anonymous Sun May 27 20:40:51 2018 No.9772269 >>9766284>returns an array instead of x+", "+y+", "+zI don't do programming.Is there not a more efficient way, or am I just retarded?
 >> Anonymous Sun May 27 21:18:55 2018 No.9772326 >>9772269===============import numpyimport mathdef largest(array): m = array.max() n = array.count(m) array = array.empty(n) array.fill(m) return array ====================Okay, I might actually be retarded.There has to be something more efficient.
 >> Anonymous Sun May 27 21:24:21 2018 No.9772331 >>9766284just have a for loop where it checks if the next element is larger.
 >> Anonymous Sun May 27 21:27:34 2018 No.9772337 >>9772331The problem is you need to know how many duplicates there are.So it could be an array with 1-3 elements.
 >> Anonymous Sun May 27 21:38:11 2018 No.9772358 >>9772326yeah: >>9769538i think numpy has boolean indexing too but im not sure how easy it is to work with
 >> Anonymous Sun May 27 21:47:42 2018 No.9772375 >>9772337A double for loop and a counter could let you keep track of duplicates, though it's pretty slow since you would go through the list for each element.
 >> Anonymous Sun May 27 22:00:48 2018 No.9772396 File: 7 KB, 420x420, b36.png [View same] [iqdb] [saucenao] [google] [report] >>9772059>do{>x+=1;>}while(x<10);>while(x<10){>x+=1;>}>DOing anything ever
 >> Anonymous Sun May 27 23:29:28 2018 No.9772530 >>9766284max = x - ((x - y) & ((x - y) >> (sizeof(int) * CHAR_BIT - 1)))Just move the electrons yourself, faggot
 >> Anonymous Mon May 28 00:13:25 2018 No.9772647 What exactly is the desired result from this function?
 >> Anonymous Mon May 28 05:42:11 2018 No.9773028 >>9772396>do{>》x+=1;>》if (x == 10){>》》flag = true;>》}>} while(!flag);>while(!flag){>》x+=1;>》if (x == 10){>》》flag = true;>》}>}wtf is do while even for
 >> Carbon Mon May 28 06:17:13 2018 No.9773083 >>9766284>returning two different typesA nightmare of checking for typesshould be nestedif x==y: if y == z: return [x,y,z] else: return [x, y]elif x==z: return [x,z]elif y==z: return [y,z]else: return [max([x,y,z])]
 >> Anonymous Mon May 28 06:19:58 2018 No.9773087 >>9772530Not bad, butmax = x > y ? x : y would be faster on cpus that have a conditional move instruction
 >> Anonymous Mon May 28 07:38:34 2018 No.9773190 >>9766446What if T's are not copy constructible? Universal references exist for a reason, anon.
 >> Anonymous Mon May 28 09:18:14 2018 No.9773297
 >> Anonymous Mon May 28 12:55:17 2018 No.9773705 File: 11 KB, 338x399, what.png [View same] [iqdb] [saucenao] [google] [report] >>9768288can you explain the last two lines to me ?
 >> Anonymous Mon May 28 13:06:08 2018 No.9773729 >>9773705>largest(34,1,1)>[1,1]lol, other anon is a dumbass
 >> Anonymous Mon May 28 13:14:05 2018 No.9773747 >>9773705if "if x>y:" hasn't run then y>x so if y>z then y is the largest else z>y>x and z is the largest.
 >> Anonymous Mon May 28 16:52:57 2018 No.9774186 >>9766284>What is list.sort()
 >> Anonymous Mon May 28 17:52:12 2018 No.9774312 >>9767899>says algorithm is unpythonic>writes unpythonic algorithmmax(args)
 >> Anonymous Mon May 28 18:03:03 2018 No.9774328 >>9773297>int x = 0;>do{>》x += 1;>}while(x >= 1);>>x goes to infinity>int x = 0;>while (x >= 1){>》x += 1;>}>>x = 0, loop skipped altogetherLiterally no good reason to DO WHILE anything if not for saving, at most, one line of code, which is already accounted for by do{ anyway.What is the point. Post a snippet that actually needs do while.
 >> Anonymous Mon May 28 18:19:26 2018 No.9774355 >>9774328again, you miss the point. the utility of a do-while is when your loop depends on the state of a variable created during the loop.here's an example I've run into. I wrote some code where I was comparing the elements of two DNA sequences pair-wise (say, GCATGCAT versus GCATCCAT) and determine which position was the last shared element, left to right.side note: this step occurs far after initial input processing steps that ensure, among many other cases, that at least the first base of the two sequences are identical.position = 0while flag is 0: if firstSeq[position] == secondSeq[position]: position = position + 1 else: flag = 1 if position > min(len(firstSeq),len(secondSeq)): flag = 1 vsposition = 0do: position = position + 1while: firstSeq[position] == secondSeq[position] & position <= min(len(firstSeq,len(secondSeq)))they're functionally nearly equivalent, but the second is miles more readable.
 >> Anonymous Mon May 28 19:04:34 2018 No.9774442 File: 87 KB, 487x473, CzYzJOBUkAAMjRK-1.jpg [View same] [iqdb] [saucenao] [google] [report] >ywn goto ever again
 >> Anonymous Tue May 29 00:55:48 2018 No.9774827 >>9774312Doesnt work, has to return duplicates and equal elements
 >> Anonymous Tue May 29 06:39:42 2018 No.9775180 >>9766284outsourcing
 >> Anonymous Tue May 29 06:51:37 2018 No.9775196 >>9766284Here's a little challenge for you: show us a function largest(a,b,c,d,e).
 >> Anonymous Tue May 29 09:15:23 2018 No.9775416 >>9775196With a little effort one could probably make a function generator that assembles an equivalent function to OP for arbitrary numbers of inputs
 >> Anonymous Tue May 29 11:55:32 2018 No.9775674 >>9766404Who said that x, y, z are integers?
 >> Anonymous Tue May 29 12:03:02 2018 No.9775693 >>9770009>>9771912x, y, z might be arbitrary objects for which the comparisons are defined (or for which the programmer has defined comparisons). For example, x,y,z could be complex numbers, and the comparison could be comparing the real part. Then obviously [x, x] would be very different from [x, y], even if x == y is true
 >> Anonymous Tue May 29 12:09:08 2018 No.9775708 >>9775196The problem is what the behaviour should be if a == b =/= c == d
 >> Anonymous Tue May 29 14:52:43 2018 No.9776039 >>9766284What language allows a function to return arrays in some cases and single values in other cases?
 >> Anonymous Tue May 29 15:29:22 2018 No.9776088 >>9776039Python
 >> Anonymous Tue May 29 15:30:27 2018 No.9776091 >>9776039meme languages /g/ uses
 >> Anonymous Wed May 30 00:54:44 2018 No.9777034
 >> Anonymous Wed May 30 09:41:01 2018 No.9777685 File: 10 KB, 296x422, r example.png [View same] [iqdb] [saucenao] [google] [report] >>9776039in addition to python >>9776088, here's an example in R. single integers are represented in R as single-element vectors so instead I had it return a list or a character
 >> Anonymous Wed May 30 09:48:35 2018 No.9777691 >>9775196def largest(a,b,c,d,e):if a==b==c==d==e:return [a,b,c,d,e]elif a==b==c==d:return [a,b,c,d]elif a==b==c==e:return [a,b,c,e]elif a==b==d==e:return [a,b,d,e]elif a==c==d==e:return [a,c,d,e]elif b==c==d==e:return [b,c,d,e]elif a==b==c:return [a,b,c]elif a==b==d:return [a,b,d]elif a==b==e:return [a,b,e]elif a==c==d:return [a,c,d]elif a==c==e:return [a,c,e]elif b==c==d:return [b,c,d]elif b==c==e:return [b,c,e]elif c==d==e:return [c,d,e]....
 >> Anonymous Wed May 30 09:56:06 2018 No.9777704 function max(a, b){ return a==b?a:(a>b?a:b)}function maxPoly(){ return Array.from(arguments).reduce(max)}
>>
 Name E-mail Subject Comment Password [?]Password used for file deletion. Captcha Action