public void Visit(Compiled.Log elem)
            {
                double arg = ValueOf(elem.Arg);

                elem.Value            = Math.Log(arg);
                elem.Inputs[0].Weight = 1 / arg;
            }
            public TapeElement Visit(Log log)
            {
                return(Compile(log, () =>
                {
                    var argElement = log.Arg.Accept(this);
                    var element = new Compiled.Log
                    {
                        Inputs = MakeInputEdges(() =>
                        {
                            edges.Add(new InputEdge {
                                Element = argElement
                            });
                        }),
                    };

                    return element;
                }));
            }
            public int Visit(Log log)
            {
                return(Compile(log, () =>
                {
                    var argIndex = log.Arg.Accept(this);
                    var element = new Compiled.Log
                    {
                        Arg = argIndex,
                        Inputs = new Compiled.InputEdge[]
                        {
                            new Compiled.InputEdge {
                                Index = argIndex
                            },
                        },
                    };

                    return element;
                }));
            }
 public void Visit(Compiled.Log elem)
 {
     LocalDerivative = elem.Adjoint / ValueOf(elem.Arg);
 }
 public void Visit(Compiled.Log elem)
 {
     elem.Value = Math.Log(ValueOf(elem.Arg));
 }