John D'Errico - MATLAB Cody - MATLAB Central

John D'Errico

1640
Rank
7
Badges
1566
Score
51 – 100 of 271

John D'Errico submitted a Comment to Problem 43166. Probabilities - Balls and urns - 02

Poorly stated question, as it is ambiguous as to whether it is asking for the number of red balls that have been observed or the number that remain in the urn. Oh, "discarded" is spelled with a d. That much I can fix.

on 7 Oct 2016

John D'Errico submitted a Comment to Solution 989507

nice

on 2 Oct 2016

John D'Errico submitted a Comment to Problem 43003. Simpsons's rule (but not Homer Simpson)

Thanks for the problem links. I'll forward that idea about editing comments to the site developers.

on 2 Oct 2016

John D'Errico submitted a Comment to Problem 42996. what can you get for exactly amount of money

A good problem, but it desperately needs more test cases. Sadly, intlinprog is not an acceptable solution method.

on 2 Oct 2016

John D'Errico submitted a Comment to Problem 42987. Roots of a quadratic equation.

Applied a tolerance, which is crucial, since tiny variations in the least significant bits due to floating point arithmetic can cause a valid solution to fail.

on 2 Oct 2016

John D'Errico submitted a Comment to Problem 42988. Linear system of equations

The tests cases used an exact test for equality. In terms of floating point numbers, this is incorrect as a test, because it can fail to recognize entirely valid solutions, and there are many ways to validly solve this problem. As such, I modified the test cases to use a tolerance on the result.

on 2 Oct 2016

John D'Errico submitted a Comment to Problem 43003. Simpsons's rule (but not Homer Simpson)

I've asked Ned how to create a new problem group first. (I don't think if I have that privilege.) Then I plan to establish a few new problem groups for problems like this. Perhaps a numerical methods group, a computational geometry group, others? I hope there will also be some existing problems I can then include in addition to those I will write.

on 2 Oct 2016

John D'Errico submitted a Comment to Problem 43003. Simpsons's rule (but not Homer Simpson)

If this problem gains some interest, I'll start trying to post additional problems. My idea is to build a new problem set, for general numerical methods like this.

on 1 Oct 2016

John D'Errico submitted a Comment to Problem 156. Parasitic numbers

I've added some test cases, that will make it a bit more difficult to game this problem.

on 30 Sep 2016

John D'Errico submitted a Comment to Problem 156. Parasitic numbers

Far too few test cases. In fact, a serious issue with this problem is that there are too few parasitic numbers that will fit into even 64 bits for most values of n.

on 30 Sep 2016

John D'Errico submitted a Comment to Problem 42935. Sums of cubes and squares of sums

I did not originally look to see exactly how far one could go. It looks like, IF one is careful in the important expression, you should be able to get to 3329020. I'd expect that the code I'd write that would solve this to go as far as 3329020 would employ an initial test to know if n is even or odd, changing the expression I'd write depending on the parity of n. Of course that branch would also increase the complexity, so raising the Cody score.

on 29 Aug 2016

John D'Errico received Speed Demon badge for Solution 944700

on 28 Aug 2016

John D'Errico submitted a Comment to Problem 240. Project Euler: Problem 6, Natural numbers, squares and sums.

A problem where one must be at least a little careful about floating point arithmetic. It might have been interesting if one of the test cases were x=1e5 or larger. Even more interesting if the execution time were a factor in the "score". These factors might impact how the problem would be best solved.

on 28 Aug 2016

John D'Errico submitted a Comment to Problem 625. Determine Whether an array is empty

Terrible test set.

on 28 Aug 2016

51 – 100 of 271
Go to top of page