Macaulay2 » Documentation
Packages » Python » PythonObject » PythonObject / PythonObject
next | previous | forward | backward | up | index | toc

PythonObject / PythonObject -- true division of Python objects

Description

Divide two Python objects, giving the "true" quotient, e.g., when dividing two integers, the result will be a float.

i1 : toPython 5 / toPython 3

o1 = 1.6666666666666667

o1 : PythonObject of class float

If one of the arguments is a Macaulay2 object, then it is first converted to a Python object before dividing.

i2 : toPython 9 / 5

o2 = 1.8

o2 : PythonObject of class float
i3 : 11 / toPython 7

o3 = 1.5714285714285714

o3 : PythonObject of class float

See also

Menu

Ways to use this method:


The source of this document is in Python/doc/arithmetic.m2:408:0.