Closed sohraa3 closed 6 years ago
It really would be much (much) better if your PRs were smaller. There are different comments to make, on each test. And once you resolve something on one test, we sill won't be able to pull this in until everything is fixed - and this sub-optimal.
So, in particular, your first test should pass. The main reason it doesn't is that you have written the 'expected' value in an unsimplified way. What is returned now is correct, and what you should expect.
I am guess that the same is true in the second failure - but you should double-check that...
The third 'failure' should also pass, and is an artifact of how you wrote down your expected.
The fourth should pass -- the problem is again in your 'expected'. You should not expect the results to contain intermediate function definitions.
(oops, that might have been about the fourth)
Fifth has some issues like the above, but may reflect a real failure.
@JacquesCarette
I'm having a difficult time figuring out how the expected should be written.
for the first test, I currently have the following expected written:
fn scale nat: fn shape prob: fn a prob: x <~ gamma(shape/a,nat2prob(scale)) return(x)
how can this be simplified or written without intermediate functions?
I tried replacing return(x)
with weight(x, return ())
as I saw it was written like that for other tests but that didn't help either.
You should simplify x <~ ...; return(x)
to just ...
I am closing this pull request to make individual pull requests for each of the tests
The tests were written for the relations in the following wikipedia page: https://en.wikipedia.org/wiki/Erlang_distribution#Related_distributions
"t_erlang_to_erlang" corresponds to the first relationship "t_erlang_to_erlang_2" corresponds to the second relationship "t_exponential_to_erlang" corresponds to the third relationship
Test results:
Failure in: 6:RoundTrip:6:0:t_erlang_to_erlang:0
Failure in: 6:RoundTrip:6:0:t_erlang_to_erlang:1
Failure in: 6:RoundTrip:6:1:t_erlang_to_erlang_2:0
Failure in: 6:RoundTrip:6:1:t_erlang_to_erlang_2:1
Failure in: 6:RoundTrip:6:2:t_exponential_to_erlang:0
Failure in: 6:RoundTrip:6:2:t_exponential_to_erlang:1