N1 is N-1,
F is N * F1.
This compiles fine and when called like this:
var W = new Variable();
foreach (var b in Factorial_01.factorial01(3, W)) Console.WriteLine(W);
it throws an exception: Expected a number but the argument is an unbound variable
however this factorial works fine, compiles and runs as expected:
N > 0,
A1 is N*A,
N1 is N -1,
when called with:
var F = new Variable();
foreach (var b in Factorial_01.factorial02(5, 1, F)) Console.WriteLine(F);
Produces the answer 120 with no exception. Any idea why this is?
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.