Equation style

R

Russell Blau

This is not really a Python question, but it does relate to a Python program
I'm working on, so this seems like as good a place as any to ask for
suggestions ...

I'm working on a GUI application that lets the user enter an alegbraic
equation and displays a nicely-formatted representation of the same equation
(and then maybe does other stuff with it). The question is: if you have an
equation containing terms such as x * y / z, which way of formatting the
equation is better (these being pathetic ASCII imitations of what the GUI
would display more nicely):

y x y
x --- or --- ?
z z

Does your answer depend on whether these symbols represent numbers,
constants, or variables? (Obviously, both forms are exactly equivalent
mathematically; the question is which one looks better for display
purposes.) Any other suggestions on style would be welcome.
 
M

Marcin 'Qrczak' Kowalczyk

if you have an
equation containing terms such as x * y / z, which way of formatting the
equation is better (these being pathetic ASCII imitations of what the GUI
would display more nicely):

y x y
x --- or --- ?
z z

The second one, usually.

This also corresponds to normal operator precedence.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,075
Latest member
MakersCBDBloodSupport

Latest Threads

Top