public void testFixingArguments() {
UnivariateFunction scaler = FunctionUtils.fix1stArgument(new Multiply(), 10);
Assert.assertEquals(1.23456, scaler.value(0.123456), EPS);
UnivariateFunction pow1 = new Power(2);
UnivariateFunction pow2 = FunctionUtils.fix2ndArgument(new Pow(), 2);
for (int i = 0; i < 10; i++) {
double x = FastMath.random() * 10;
Assert.assertEquals(pow1.value(x), pow2.value(x), 0);
}