Menu

Product

Nicolas Hainaux
Attachments
dbg_product.png (2055 bytes)
memo_product.png (2947 bytes)

This class is used to manipulate products. Any Product has a certain number of factors and also may have an exponent different from 1. When itering over a Product, the iteration will be over its factors and over the exponent.

So far, a Product does not have its own 'real' sign. The sign used to determine the writing rules (is there a '+' or a '-' at the beginning... ?) is most of the time the one of the first factor. For instance, if you have a Sum embedding these Products : 8×4, -6×2 and 9×3, you will have to know that the first term is like a positive (so, at the beginning of an expression, no '+' sign should be displayed) and that the third term either (but there, display a '+' sign) ; the second is like a negative (so, the '+' 'sign' of the Product shoudn't have to be displayed here...).

Possible args for __init__() :
None | Product | Number | Exponented | [Numbers|Exponenteds]

Field :
factor : it is the factors' list

Debugging info :

Check Product's complete doc

Back


Related

Doc for dev: Core Objects
Doc for dev: Item
Doc for dev: Monomial
Doc for dev: Sum

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.