User talk:Arseniiv/Factorization: Difference between revisions
→numbers as names: regex-sample... |
|||
(7 intermediate revisions by 2 users not shown) | |||
Line 8: | Line 8: | ||
::: Please have a look on [[SandBox#Testing factor notation]], only unsolved problem here is the trailing dot. --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 21:21, 7 November 2020 (UTC) | ::: Please have a look on [[SandBox#Testing factor notation]], only unsolved problem here is the trailing dot. --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 21:21, 7 November 2020 (UTC) | ||
:::: Looks good! Though maybe also alternatively use <code>^</code> for powers? --[[User:Arseniiv|Arseniiv]] ([[User talk:Arseniiv|talk]]) 21:28, 7 November 2020 (UTC) | |||
::::: I read it only now (same idea nearly at the same time🙂). I think <code>^</code> looks better, it's now also possible to stuff space around the operators. --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 21:37, 7 November 2020 (UTC) | |||
:::::: Missed your developments while extending my version. This code is way simpler but it needs obligatory <code>*</code>s… or that can be changed? How do you think about if <code>*</code> are needed? | |||
:::::: It seems I should have written another reply here and not in [[User talk:Arseniiv#Infobox helper]], ow. Reposting it here now: | |||
:::::: ❝ When you’re back, please look at the current version. I think it works as expected. It also does understand <code>^</code> for <code>**</code>, doesn’t shy from excess spaces, and makes minuses into unicode minus − which is a bit higher and wider than - and matches + and tall characters like digits: −+- −3 -3. But the code is almost unreadable and I needed to use <code>#regex</code> twice, otherwise the dots in the middle were deleted together with the trailing one. {{User:Arseniiv/Factorization|2**3 * 5 * 7^ -5 * 11 ** 9 19 ^-4}} ❞ --[[User:Arseniiv|Arseniiv]] ([[User talk:Arseniiv|talk]]) 23:30, 7 November 2020 (UTC) | |||
::::::: Could it be that letting out the multiplication symbol is not a requirement? As far as I know, the symbol is left out for single-char variables, not between numbers. Wolfram alpha for example provides these syntax variants: [[alpha: 2^4*3^-2]], [[alpha: 2**4*3**-2]], this variant is <code>2^4 3^-2</code> accepted in the input box there (but indicated as a bit ambiguous), but ''we'' have a bit of trouble to get it correctly transferred via interwiki [[alpha: 2^4 3^-2]], that's why I'd suggest to drop it's support to reduce confusion. My concern is also about the "service focus": you don't get the factorization itself from the template (which you actually want to get done, because it's hard) but syntax conversion (which is way easier) - I'm sure you get my point. What else should be discussed? Should I do a bit of testing? Do you want to do another iteration before? --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 09:04, 8 November 2020 (UTC) | |||
:::::::: I’m not against mandatory multiplication, I just thought it may look easier on the eyes when editing pages. :) As about testing… First I’ll make the template easier like in your variant where <code>#regex</code> is used only once, and then check examples from the docs (with multiplications inserted everywhere), and I think they should cover all possibilities, so then I’ll write here for us to deploy it. Also is it time for Todo too? Ah, I hadn’t moved docs out yet, but maybe you could?.. --[[User:Arseniiv|Arseniiv]] ([[User talk:Arseniiv|talk]]) 11:22, 8 November 2020 (UTC) | |||
:::::::: Now I believe this one is alright! {{User:Arseniiv/Factorization| 2 * 3*5^-4 *7**2 * 31 ^ -1 }} --[[User:Arseniiv|Arseniiv]] ([[User talk:Arseniiv|talk]]) 11:52, 8 November 2020 (UTC) |