示例#1
0
            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)));
                }
            }
示例#2
0
 public void LogContract()
 {
     Assert.Throws <ArgumentNullException>(() => TermBuilder.Log(null));
     Assert.IsType <Log>(TermBuilder.Log(x));
 }