New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unicode printing problem with mixture of logs and powers #9034

Closed
pelegm opened this Issue Feb 20, 2015 · 0 comments

Comments

Projects
None yet
1 participant
@pelegm
Copy link
Contributor

pelegm commented Feb 20, 2015

Say n is an integer symbol. The following

log(n**(log((1+1/n)*n, 2)))

prints

   ⎛    ⎛  ⎛    1⎞⎞⎞
   ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
   ⎜    ⎝  ⎝    n⎠⎠⎟
   ⎜ ──────────────⎟
   ⎜     log(2)    ⎟
   ⎝n              ⎠

log                 

so for some reason the (...) of the log hangs one line above it.

flacjacket added a commit to flacjacket/sympy that referenced this issue Apr 18, 2015

Fix printing of functions with tall arguments
Previously, the baseline of the function name for tall function
arguments was set in the wrong direction.  Such as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
       ⎝n              ⎠

    log

This fixes the offset to print as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
    log⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
       ⎝n              ⎠

Closes sympy#9034

flacjacket added a commit to flacjacket/sympy that referenced this issue Apr 18, 2015

Fix printing of functions with tall arguments
Previously, the baseline of the function name for tall function
arguments was set in the wrong direction.  Such as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
       ⎝n              ⎠

    log

This fixes the offset to print as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
    log⎝n              ⎠

such that the function name stays in-line with the baseline of the
function argument.

Closes sympy#9034

flacjacket added a commit to flacjacket/sympy that referenced this issue Apr 18, 2015

Fix printing of functions with tall arguments
Previously, the baseline of the function name for tall function
arguments was set in the wrong direction.  Such as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
       ⎝n              ⎠

    log

This fixes the offset to print as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
    log⎝n              ⎠

such that the function name stays in-line with the baseline of the
function argument.

Closes sympy#9034

flacjacket added a commit to flacjacket/sympy that referenced this issue Apr 27, 2015

Fix printing of functions with tall arguments
Previously, the baseline of the function name for tall function
arguments was set in the wrong direction.  Such as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
       ⎝n              ⎠

    log

This fixes the offset to print as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
    log⎝n              ⎠

such that the function name stays in-line with the baseline of the
function argument.

Closes sympy#9034

flacjacket added a commit to flacjacket/sympy that referenced this issue Apr 27, 2015

Fix printing of functions with tall arguments
Previously, the baseline of the function name for tall function
arguments was set in the wrong direction.  Such as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
       ⎝n              ⎠

    log

This fixes the offset to print as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
    log⎝n              ⎠

such that the function name stays in-line with the baseline of the
function argument.

Closes sympy#9034

flacjacket added a commit to flacjacket/sympy that referenced this issue Apr 27, 2015

Fix printing of functions with tall arguments
Previously, the baseline of the function name for tall function
arguments was set in the wrong direction.  Such as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
       ⎝n              ⎠

    log

This fixes the offset to print as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
    log⎝n              ⎠

such that the function name stays in-line with the baseline of the
function argument.

Closes sympy#9034

@jcrist jcrist closed this in #9316 May 27, 2015

skirpichev added a commit to diofant/diofant that referenced this issue Jul 1, 2015

Fix printing of functions with tall arguments
Previously, the baseline of the function name for tall function
arguments was set in the wrong direction.  Such as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
       ⎝n              ⎠

    log

This fixes the offset to print as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
    log⎝n              ⎠

such that the function name stays in-line with the baseline of the
function argument.

Closes sympy/sympy#9034

skirpichev added a commit to diofant/diofant that referenced this issue Jul 3, 2015

Fix printing of functions with tall arguments
Previously, the baseline of the function name for tall function
arguments was set in the wrong direction.  Such as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
       ⎝n              ⎠

    log

This fixes the offset to print as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
    log⎝n              ⎠

such that the function name stays in-line with the baseline of the
function argument.

Closes sympy/sympy#9034

skirpichev added a commit to diofant/diofant that referenced this issue Jul 3, 2015

Fix printing of functions with tall arguments
Previously, the baseline of the function name for tall function
arguments was set in the wrong direction.  Such as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
       ⎝n              ⎠

    log

This fixes the offset to print as::

    In [1]: log(n**(log((1+1/n)*n, 2)))
    Out[1]:
       ⎛    ⎛  ⎛    1⎞⎞⎞
       ⎜ log⎜n⋅⎜1 + ─⎟⎟⎟
       ⎜    ⎝  ⎝    n⎠⎠⎟
       ⎜ ──────────────⎟
       ⎜     log(2)    ⎟
    log⎝n              ⎠

such that the function name stays in-line with the baseline of the
function argument.

Closes sympy/sympy#9034
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment