mathparse
mathparse copied to clipboard
Fixing float + Decimal (Type Error) | And allowing math syntax without spaces as input
Type Error may occur in complicated expression where float get added to Decimal. Treating float as Decimal will fix the issue.
Adding a function to add spaces in expression so 4+2
in statement.text will become valid to be tokenized.
# This
23456.01+(2435.2/523454.324)-(52344^3+5435)^2
# Will be extracted as
23456.01 + (2435.2 / 523454.324) - (52344 ^ 3 + 5435) ^ 2
Fixed tests so Decimal and Float be compared correctly (using float...)