Anonymous user
Unicode polynomial equation: Difference between revisions
m
misc tidy of desc
(Normalise a polynomial: e.g. x⁵ - 2x⁴ + 42x³ + 40x + 1) |
m (misc tidy of desc) |
||
Line 1:
{{Template:Draft task}}<!--{{Wikipedia|Polynomial}}-->
The objective of this task is to parse in a difficult [[wp:polynomial|polynomial]], and generate a "pretty" representation of the polynomial in Unicode.
In the target language define a "
'''Task details:'''
Line 24:
|"One" coefficients are normalised||1x⁵ - 2x⁴ + 42x³ + 40x + 1x⁰
|-
|Signs are normalised||+x⁺⁵ + -2x⁻⁻⁴ + 42x⁺⁺³ + +40x - -1
|-
|ASCII representations are parsed||x^5 - 2x**4 + 42x^3 + 40x + 1
|-
|Non-ASCII representations are parsed||
|-
|Terms with negative exponents are parsed and stored||x⁻⁵ - 2⁄x⁻⁴ + 42x⁻³ + 40/x + 1 (n.b. [[wp:Unicode_numerals#Fractions|Unicode Fraction]])
Line 36:
|Single commas are ignored in numbers||x⁵ - 2x⁴ + 0,042x³ + 40.000,000x + 1
|-
|A coefficient may be duplicated, zero,
|-
|Support Scientific notation
||1E0x⁵ - 2e0x⁴ + 4.2⏨1x³ + .40e-2x + 1
|-
|Support the set minimum of Unicode characters as follows: ||⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁻ ⁺ · × ⁄ .<br>
|-
|Optionally support [[wp:Number Forms|Unicode Vulgar fractions]]
|}
There are (at least) three possible ways of achieving this task.
Line 49:
* Using a built-in parsing/formatting library.
* Coding a custom polynomial parsing routing.
Either one, or all of these approaches are
[[Category:Mathematics]]
|