Skip to content
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

print symbolic fractions more naturally: print 2/(x+2) instead of 2 (1/(x+2)) #7363

Closed
jasongrout opened this issue Oct 31, 2009 · 10 comments
Closed

Comments

@jasongrout
Copy link
Member

See http://groups.google.com/group/sage-devel/browse_frm/thread/9d58693356e11947

CC: @burcin

Component: symbolics

Keywords: pynac, symbolic, print

Author: Burcin Erocal

Reviewer: Karl-Dieter Crisman, Ross Kyprianou

Merged: sage-4.3.3.alpha1

Issue created by migration from https://trac.sagemath.org/ticket/7363

@burcin
Copy link

burcin commented Jan 17, 2010

add doctests

@burcin
Copy link

burcin commented Jan 17, 2010

comment:2

Attachment: trac_7363-mul_coeff.patch.gz

Next pynac release will have a patch for this. attachment: trac_7363-mul_coeff.patch fixes some doctests and adds a couple more.

@burcin
Copy link

burcin commented Jan 17, 2010

Changed keywords from none to pynac

@burcin
Copy link

burcin commented Jan 17, 2010

Author: Burcin Erocal

@burcin
Copy link

burcin commented Jan 19, 2010

comment:3

New pynac package available here:

http://sage.math.washington.edu/home/burcin/pynac/pynac-0.1.11.spkg

The package contains fixes for #7822, #6961, #7876, #7363, #6465 and #6559. Apart from this ticket, #7876 contains printing changes. Doctests should be run with the patch from that ticket applied as well.

@kcrisman
Copy link
Member

comment:4

This seems to work well, but I do not know enough C++ to review http://pynac.sagemath.org/hg/rev/5ea74f619c01, unfortunately. Partial positive review?

@sagetrac-rossk
Copy link
Mannequin

sagetrac-rossk mannequin commented Feb 15, 2010

Reviewer: Karl-Dieter Crisman, Ross Kyprianou

@sagetrac-rossk
Copy link
Mannequin

sagetrac-rossk mannequin commented Feb 15, 2010

Changed keywords from pynac to pynac, symbolic, print

@sagetrac-rossk
Copy link
Mannequin

sagetrac-rossk mannequin commented Feb 15, 2010

comment:5

Im also not qualified to review the C++ code but the (representative) examples below indicate the code satisfies the objectives so Im giving it a positive review (which someone can reverse if they discover a counterexample)

# Note: division is left associative: 12/3/4 = (12/3)/4
sage: 12/3/4 
1

sage: var('x y z')
(x, y, z)

sage: 2/(x+1) # the motivating example
2/(x + 1)

sage: 1/(2*y)
1/2/y

sage: 1/(1/2*y)
2/y

sage: x/2/y
1/2*x/y

sage: .5*x/y
0.500000000000000*x/y

sage: .5/x/y
0.500000000000000/(x*y)

sage: 1/2/x/y
1/2/(x*y)

sage: 1/x/2
1/2/x

@sagetrac-mvngu
Copy link
Mannequin

sagetrac-mvngu mannequin commented Feb 18, 2010

Merged: sage-4.3.3.alpha1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants