public SubstitutionResult Visit(Log log) { var argResult = log.Arg.Accept(this); double argValue; if (TryGetConstant(argResult, out argValue)) { return(CreateResult(Math.Log(argValue))); } else { return(CreateResult(TermBuilder.Log(argResult.Term))); } }
public void LogContract() { Assert.Throws <ArgumentNullException>(() => TermBuilder.Log(null)); Assert.IsType <Log>(TermBuilder.Log(x)); }