Skip to main content

Timeline for Sandbox for Proposed Challenges

Current License: CC BY-SA 4.0

21 events
when toggle format what by license comment
Sep 4, 2019 at 9:07 comment added caird coinheringaahin g Mod Now that this has been posted, it would be best to delete it, to free up space
Sep 3, 2019 at 21:05 history edited Value Ink CC BY-SA 4.0
added 67 characters in body
Aug 30, 2019 at 2:58 comment added Value Ink @Joel I'm not sure (I assume it's fine), but if the dilemma is nagging you I think it's best if asked as a separate meta post and not as a comment in here...
Aug 30, 2019 at 2:47 comment added Joel I just wonder, is it appropriate for me to post solutions after getting involved in improving the challenge?
Aug 30, 2019 at 2:02 comment added Value Ink @Joel good idea. Thanks for the tip
Aug 30, 2019 at 2:02 history edited Value Ink CC BY-SA 4.0
added 63 characters in body
Aug 30, 2019 at 1:42 comment added Joel You may add a note saying that the returned answer can be a float (like 5.0) or an integer.
Aug 30, 2019 at 0:15 comment added Value Ink @Jitse won't that be hard for people whose languages are strongly typed or something? Although I guess they can just do -5.0 anyways. Ok, I've changed them.
Aug 30, 2019 at 0:15 history edited Value Ink CC BY-SA 4.0
deleted 6 characters in body
Aug 29, 2019 at 8:10 comment added Jitse I really like this challenge. It is very easy to understand and the implementation is not as trivial as it initially seems. I do think that you should include some non-decimal test cases like @Joel suggested, such as -5 and 5.
Aug 29, 2019 at 3:29 history edited Value Ink CC BY-SA 4.0
added 2 characters in body
Aug 29, 2019 at 3:20 comment added Joel @Value Ink The outcome of the modulo operation varies in different programming languages when a negative number is involved (see the big table at the right side of the wiki page). Your solution can only give correct answers in some languages. This is actually a good task to make people aware of that. By the way, the first and third test cases yield wrong results.
Aug 28, 2019 at 21:35 comment added Value Ink @FryAmTheEggman brings up a good point though, what's stopping people from doing something like +sign(input%1) to trivialize the challenge? Maybe I shouldn't post this after all
Aug 28, 2019 at 21:26 history edited Value Ink CC BY-SA 4.0
added 10 characters in body
Aug 28, 2019 at 20:26 history edited Value Ink CC BY-SA 4.0
added 83 characters in body
Aug 28, 2019 at 0:30 comment added FryAmTheEggman @Joel That is true, and I guess also adding a check for being an integer is probably different enough in most languages? I'll leave my comment in case another similar problem emerges but it is likely that someone will make the same mistake I do, so it may be a good idea to specifically say this won't work in the challenge.
Aug 27, 2019 at 23:27 comment added Joel The test case inputs may have a better coverage for all cases: [-99.9, -5, -2.0, -1.1, 0, 0.0, 1.1, 2.0, 5, 99.9].
Aug 27, 2019 at 23:02 comment added Joel @FryAmTheEggman Actually, that solution would give incorrect answers for all integers except 0.
Aug 27, 2019 at 15:03 comment added FryAmTheEggman I'm not certain if this is a dupe, since most answers to this can be an answer from the inspiration but with +sign(input) tacked on. I think that may be competitive in too many languages.
Aug 26, 2019 at 23:58 comment added Unrelated String It's a great idea, because truncation-based methods from the original won't work quite as well, but there's still plenty of room to be clever.
Aug 26, 2019 at 23:00 history answered Value Ink CC BY-SA 4.0