for instance, here, $n$ should be asserted to not be null when initialize() is called where presenty it is only checking the α variable registered via a context. this isnt strictly a bug but ensuring these are validated once with initialize has a much greater likelihood of catching a tracking down problems before they occur or figuring out why something aint working
package arb.functions.real;
import arb.Integer;
import arb.Real;
import arb.functions.Function;
public class factorℝ1 implements
Function<Integer, Real>
{
private boolean isInitialized;
public Integer n;
public Integer p;
public Integer q;
public Real α;
public Real β;
public Real z;
public Real evaluate(Integer in, int order, int bits, Real result)
{
if (!isInitialized)
{
initialize();
}
return α.get(in).risingFactorial(n, bits, result);
}
public void initialize()
{
if (isInitialized)
{
throw new AssertionError("Already initialized");
}
else if (α == null)
{
throw new AssertionError("α is null");
}
else
{
isInitialized = true;
}
}
}
for instance, here, $n$ should be asserted to not be null when initialize() is called where presenty it is only checking the α variable registered via a context. this isnt strictly a bug but ensuring these are validated once with initialize has a much greater likelihood of catching a tracking down problems before they occur or figuring out why something aint working