Questions about mathematical signs...

Dan Bishop danb_83 at yahoo.com
Sun Feb 6 23:46:34 EST 2005


Jeff Epler wrote:
> On Sun, Feb 06, 2005 at 12:26:30PM -0800, administrata wrote:
> > Hi! I'm programming maths programs.
> > And I got some questions about mathematical signs.
...
> > 2. Inputing fractions like (a / b) + (c / d), It's tiring work too.
> >    Can it be simplified?
>
> Because of the rules of operator precedence,
>     a / b + c / d
> has the same meaning as the expression you gave.

And it's important to note that that meaning will change in version
3.0.  Until then, it's best to start every module with "from __future__
import division".




More information about the Python-list mailing list