Skip to main content

Timeline for Lonely Multiplication

Current License: CC BY-SA 4.0

11 events
when toggle format what by license comment
Feb 11, 2020 at 9:51 comment added Noodle9 @AdamChalcraft gcc uses the same register for the first function parameter and the return value if they're both int. So yes, it's a golf hack to simply assign the return value to the first parameter.
Feb 11, 2020 at 7:14 comment added Adam Chalcraft I have a n00b question. What's the "a=" doing there? It looks like it's a golf replacement for "return " but if so it's new to me. Thanks.
Feb 10, 2020 at 19:52 comment added Noodle9 @79037662 Well done - we got there! :-)
Feb 10, 2020 at 19:51 history edited Noodle9 CC BY-SA 4.0
deleted 1 character in body
Feb 10, 2020 at 19:50 comment added 79037662 42 bytes: tio.run/##S9ZNT07@/…
Feb 10, 2020 at 19:43 comment added Noodle9 @79037662 Nice one - thanks! :-)
Feb 10, 2020 at 19:41 history edited Noodle9 CC BY-SA 4.0
added 117 characters in body
Feb 10, 2020 at 19:37 comment added 79037662 Here's a version for 45 bytes, I think it can be reduced further but I'm not sure. tio.run/##S9ZNT07@/…
Feb 10, 2020 at 19:20 comment added Noodle9 @79037662 Yes, I have thought of that but my head's still spinning from getting this to work! T_T
Feb 10, 2020 at 19:04 comment added 79037662 I believe you can use a^c (bitwise xor) to check for equality which is shorter than c==a. Note that you'd have to flip the other parts of the ternary.
Feb 10, 2020 at 18:52 history answered Noodle9 CC BY-SA 4.0