Message #1672

From: Melinda Green <melinda@superliminal.com>
Subject: Re: [MC4D] Goldilock’s function
Date: Mon, 09 May 2011 00:46:34 -0700

Hello David,

I’m getting close here. Please do me a favor and add all of the test
values and their outputs in your favorite language something like this:
System.out.println("Goldilocks Function for");
System.out.println("2^3 cube = " + goldilocks(2*2*2, 6,
2*2*6, 0, 3) + " expected = 11");
System.out.println("3^3 cube = " + goldilocks(3*3*3-1, 6,
3*3*6, 6, 3) + " expected = 25");
System.out.println("4^3 cube = " + goldilocks(4*4*4-2*2*2, 6,
4*4*6, 4*6, 3) + " expected = 43");
System.out.println("3^4 cube = " + goldilocks(3*3*3*3, 8, 216,
8*1, 4) ….

I want to know when I’ve gotten the correct formula and that it’s
expected output is it exactly right for all the puzzles that you expect.

Thanks,
-Melinda