Menu

Sum

Nicolas Hainaux
Attachments
dbg_sum.png (1240 bytes)
memo_sum.png (2456 bytes)
There is a newer version of this page. You can find it here.

/!\ just a draft

This class is used to manipulate sums. A Sum has a certain number of terms and also may have an exponent different from 1. When itering over a Sum, the iteration will be over its terms and over the exponent.

As well as for Product, a Sum does not have its 'own' sign. See explanations in Product.

Possible args for __init__() :
None | Sum | Number | String | Exponented | [Number | String | Exponented]

Fields :
term: this is the term's list
force_display_inner_brackets: if this boolean is set to True, inner brackets will be displayed preceded by a '+'; for instance 1+2 will be displayed +(1+2); in some cases the inner brackets are displayed even if force_display_inner_brackets is not set to True: for instance (-1)² (single negative element and exponent different from 1) or (3+1)² (several terms and an exponent different from 1)

Debugging info :

Check Sum's complete doc

Back


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.