Jump to content

Unicode polynomial equation: Difference between revisions

Specifically permit non-polynomials where terms have negative exponents
m (Add the "0" polynomial test case.)
(Specifically permit non-polynomials where terms have negative exponents)
Line 32:
|Non-ASCII representations are parsed||x↑5 - 2.00·x⁴ + 42.00·x³ + 40.00·x + 1 (c.f. [[wp:Knuth's up-arrow notation|↑]] & [[wp:·#In_mathematics_and_science|·]])
|-
|TermsSpecifically withpermit negativenon-polynomials exponentswhere areterms parsedhave andnegative storedexponents||x⁻⁵ - 2⁄x⁴ + 42x⁻³ + 40/x + 1x⁻⁰ (n.b. [[wp:Unicode_numerals#Fractions|Unicode Fraction]])
|-
|Spaces in numbers and between operators are ignored||x⁵ - 2x⁴ + 42.000 000x³ + 40x + 1
Line 43:
||1E0x⁵ - 2,000,000.e-6x⁴ + 4.2⏨1x³ + .40e+2x + 1
|-
|SupportUnicode thecharacters setthat minimummust ofbe Unicodespecifically characters assupported followsare: ||⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁻ ⁺ · × ⁄ ↑ ⏨.<br>Where ×· & × are multiplication, and ⁄ is Unicode Fraction.
|-
|Support fractions for both input and output. || x⁵ - x⁴⁄2 + 405x³⁄4 + 403x⁄4 + 5⁄2<BR>On output round the decimal to appropriate fraction.
|-
|Optionally support [[wp:Number Forms|Unicode Vulgar fractions]] for both input and output.<BR>¼ ½ ¾ ⅐ ⅑ ⅒ ⅓ ⅔ ⅕ ⅖ ⅗ ⅘ ⅙ ⅚ ⅛ ⅜ ⅝ ⅞ ↉ || x⁵ - ½x⁴ + 101¼x³ + 100¾x + 2½<BR>On output round the decimal to appropriate fraction.
|}
 
There are (at least) three possible ways of achieving this task.
* Using an external parsing library.
Cookies help us deliver our services. By using our services, you agree to our use of cookies.