Opened 11 years ago

Closed 11 years ago

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

Reported by: Owned by: jason burcin minor sage-4.3.3 symbolics pynac, symbolic, print burcin sage-4.3.3.alpha1 Burcin Erocal Karl-Dieter Crisman, Ross Kyprianou N/A

### comment:1 Changed 11 years ago by jason

• Priority changed from major to minor

### comment:2 Changed 11 years ago by burcin

• Authors set to Burcin Erocal
• Report Upstream set to N/A
• Status changed from new to needs_work

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

### comment:3 Changed 11 years ago by burcin

• Status changed from needs_work to needs_review

New pynac package available here:

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.

### comment:4 Changed 11 years ago by kcrisman

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?

### comment:5 Changed 11 years ago by rossk

• Reviewers set to Karl-Dieter Crisman, Ross Kyprianou
• Status changed from needs_review to positive_review

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
```

### comment:6 Changed 11 years ago by mvngu

• Merged in set to sage-4.3.3.alpha1
• Resolution set to fixed
• Status changed from positive_review to closed
Note: See TracTickets for help on using tickets.