In my view it surely would look more readable!


On Thu, Apr 17, 2014 at 3:56 PM, Sudhanshu Mishra
<notifications@github.com>wrote:

> In sympy/core/function.py:
>
> > +        We can also specify the discretized values to be used in a sequence:
> > +
> > +        >>> f(x).diff(x).as_finite_diff([
> x, x+h, x+2*h])
> > +        -3*f(x)/(2*h) + 2*f(h + x)/h - f(2*h + x)/(2*h)
> > +
> > +        The algorithm is not restricted to use equidistant spacing, nor
> > +        do we need to make the approximation around x0, but we can get
> > +        an expression estimating the derivative at an offset:
> > +
> > +        >>> e, sq2 = exp(1), sqrt(2)
> > +        >>> xl = [x-h, x+h, x+e*h]
> > +        >>> f(x).diff(x, 1).as_finite_diff(xl, x+h*sq2)
> > +        2*h*((h + sqrt(2)*h)/(2*h) - (-sqrt(2)*h + h)/(2*h))*f(E*h + x)/\
> > +((-h + E*h)*(h + E*h)) + (-(-sqrt(2)*h + h)/(2*h) - \
> > +(-sqrt(2)*h + E*h)/(2*h))*f(-h + x)/(h + E*h) + \
> > +(-(h + sqrt(2)*h)/(2*h) + (-sqrt(2)*h + E*h)/(2*h))*f(h + x)/(-h + E*h)
>
> I'm not sure but shouldn't last three lines be indented to the same level.
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/sympy/sympy/pull/7382/files#r11750883>
> .
>