Talk:Unicode polynomial equation: Difference between revisions

Content added Content deleted
m (→‎Suggested improvements: example Unicode polynomial x⁵ - 2x⁴ + 42x³ + 40x + 1)
Line 1: Line 1:
== Openended and misnamed? ==
== Suggested improvements ==


This proposal does not limit the syntax in any way. It does not mention parenthesis. Meanwhile, 1+1/x is not a polynomial (and neither is x^1/x), and limiting supported syntax to only that unicode which can represent polynomials would still allow for a variety of ambiguities, such as:
This proposal does not limit the syntax in any way. It does not mention parenthesis. Meanwhile, 1+1/x is not a polynomial (and neither is x^1/x), and limiting supported syntax to only that unicode which can represent polynomials would still allow for a variety of ambiguities, such as:
Line 10: Line 10:


I recommend explicitly listing the characters which should be supported, and eliminating the parts of the task description which refer to negative exponents. Another alternative would be to change the task name and explicitly document the syntax being supported. --[[User:Rdm|Rdm]] 19:12, 18 November 2011 (UTC)
I recommend explicitly listing the characters which should be supported, and eliminating the parts of the task description which refer to negative exponents. Another alternative would be to change the task name and explicitly document the syntax being supported. --[[User:Rdm|Rdm]] 19:12, 18 November 2011 (UTC)
::re: Openended - I've added a specific list of unicode that should be supported. e.g. {⁰ ¹ ² ³ ⁴ ⁵ ⁶ ⁷ ⁸ ⁹ ⁻ ⁺ · × ⁄ ↑ ⏨} (I hope I have not missed any interesting ones).
::*re: cry - The task is for polynomials of one variable, and "x" is the tradition "unknown". However I am inclined to think that the first lowercase letter (excluding "e") could be used as the "unknown", eg z, y etc.
::*re: c₁y¹+c₂y² - The examples in the text are with real coefficients. Allowing c₁ & c₂ would make the coefficients symbolic, and thus the task a whole lot harder. Similarly allowing complex numbers might stress some contributors: z⁵ - (1+2i)z⁴ + (405+4i)z³ + (403+4i)z + 5+2i ''or'' z⁵ - 1⊥2 z⁴ + 5⊥4 z³ + 3⊥4 z + 5⊥2. I have left manipulation of complex numbers to a future task.
::*re: negative exponents / misnamed? - it seemed a shame to restrict the exponent to just +ve Integers. And it is only as very minor code adjustment to allow -ve exponents in a "finite power series" and it does not detract from polynomials. Is there a better name for equations such as: x⁻⁵ - 2⁄x⁴ + 42x⁻³ + 40/x + 1x⁻⁰ + 40x + 42x³ - 2x⁴ + x⁵? Maybe "finite power series"?
::*re:∑ (1+xⁿ)xⁱ - true.. if n and the bounds of the ∑ are known, then it could be a polynomial. But again, let us avoid symbolic manipulation. A simple array of real coefficients is what is required.
::ThanX for the feedback. [[User:NevilleDNZ|NevilleDNZ]] 05:46, 19 November 2011 (UTC)


: I find this task objectionable, if for no other reason than promoting bad typography. The unicode super-/subscripts are only good for when you don't have a way to mark up text. They are generally too small, inflexible, and unpleasant to look at. And, I don't see any practical merit in parsing such strings: I don't see why a human would carefully type out those difficult symbols as input data to a program, and if it's generated by machines, you might as well tell the machine to do a better job by writing structured/properly marked up data. --[[User:Ledrug|Ledrug]] 03:00, 19 November 2011 (UTC)
: I find this task objectionable, if for no other reason than promoting bad typography. The unicode super-/subscripts are only good for when you don't have a way to mark up text. They are generally too small, inflexible, and unpleasant to look at. And, I don't see any practical merit in parsing such strings: I don't see why a human would carefully type out those difficult symbols as input data to a program, and if it's generated by machines, you might as well tell the machine to do a better job by writing structured/properly marked up data. --[[User:Ledrug|Ledrug]] 03:00, 19 November 2011 (UTC)

I'm sorry that you find this task objectionable, which languages have built in "mark up text"? I am using unicode because unicode is standardised, and widely supported. wikitext on the other hand is a non-standard e.g. {[[wp:AsciiDoc|AsciiDoc]], [[wp:BBCode|BBCode]], [[wp:Creole (markup)|Creole]], [[wp:deplate|deplate]], [[wp:Markdown|Markdown]], [[wp:MediaWiki|MediaWiki]], [[wp:Org-mode|Org-mode]], [[wp:PmWiki|PmWiki]], [[wp:Plain Old Documentation|POD]], [[wp:reStructuredText|reStructuredText]], [[wp:Setext|Setext]], [[wp:Textile (markup language)|Textile]], [[wp:Texy!|Texy!]], [[wp:txt2tags|txt2tags]], etc. etc. etc. also XML & HTML & Latex) and not built in to many languages.

The other problem with "markup" is that inevitably when a polynomial is cut and pasts it gets broken:
{|class="wikitable" style="text-align: center; margin: 1em auto 1em auto;"
|+Comparing cut and pasting of polynomials.
!Method || Example || Markup || Paste result
|-
|Unicode || x⁵ - 2x⁴ + 42x³ + 40x + 1 || x⁵ - 2x⁴ + 42x³ + 40x + 1 || x⁵ - 2x⁴ + 42x³ + 40x + 1
|-
|MediaWiki || x<sup>5</sup> - 2x<sup>4</sup> + 42x<sup>3</sup> + 40x + 1|| <nowiki>x<sup>5</sup> - 2x<sup>4</sup> + 42x<sup>3</sup> + 40x + 1</nowiki>|| x5 - 2x3 + 42x3 + 40x + 1
|}

I would agree that program should be agnostic of input and output formats. So providing a way (plugin, template or library) to read/write data from unicode and/or wikitext would be an effective way for supporting it. Do you suggest a task for every different kind of markup, or do you have a particular favourite wikitext? I am happy to suggests improvements if you create a task to which implements your favourite markup.

ThanX for the feedback. [[User:NevilleDNZ|NevilleDNZ]]


==Format of the task==
==Format of the task==