Talk:Relative errors of small EDOs: Difference between revisions

No edit summary
Xenwolf (talk | contribs)
m Xenwolf moved page Talk:Relative errors of small edos to Talk:Relative errors of small EDOs: make the abbreviation obvious
 
(20 intermediate revisions by 2 users not shown)
Line 1: Line 1:
__TOC__
== (WIP) Relative Errors of Small Edos ==
== (WIP) Relative Errors of Small Edos ==


Line 14: Line 16:
: > percent
: > percent
: I'll do the switch after I fill it all up to see if it looks better. [[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 15:15, 14 May 2020 (UTC)
: I'll do the switch after I fill it all up to see if it looks better. [[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 15:15, 14 May 2020 (UTC)
:: Maybe I can help you with this, I'm a professional programmer who can automate this with Perl or Python. I'd also hand you the script for further adaption then ... Please tell me if this sounds right to you. --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 18:49, 14 May 2020 (UTC)
::: Nice.
::: I don't suppose your script generates those values (cuz I did so in C), just doing with the table, right? [[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 02:52, 15 May 2020 (UTC)
:::: Such a script would also generate the values. --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 05:50, 15 May 2020 (UTC)
::::: Let's do it then. [[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 12:04, 15 May 2020 (UTC)
== permille vs. percent ==
Comparison of permille and percent formatting below. I restricted the tables to only a few columns and rows
{|
|
{| class="wikitable sortable mw-collapsible" style="text-align:right"
! rowspan="2" | Edo
! colspan="5" | Relative Errors (in ‰)
|-
!  3/1
!  5/1
!  7/1
! 11/1
! 13/1
|-
|  9
| -264.7
|  102.6
| -266.2
| -134.9
| -304.0
|-
| 10
|  150.4
| -219.3
|  -73.5
|  405.7
|  -4.4
|-
| 11
| -434.6
|  458.8
|  119.1
|  -53.7
|  295.2
|-
| 12
|  -19.6
|  136.9
|  311.7
|  486.8
| -405.3
|-
| 13
|  395.5
| -185.1
| -495.6
|  27.4
| -105.7
|-
| 14
| -189.5
|  493.0
| -303.0
| -432.0
|  193.8
|}
|
{| class="wikitable sortable mw-collapsible" style="text-align:right"
! rowspan="2" | Edo
! colspan="5" | Relative Errors (in %)
|-
!  3/1
!  5/1
!  7/1
! 11/1
! 13/1
|-
|  9
| -26.47
|  10.26
| -26.62
| -13.49
| -30.40
|-
| 10
|  15.04
| -21.93
|  -7.35
|  40.57
|  -0.44
|-
| 11
| -43.46
|  45.88
|  11.91
|  -5.37
|  29.52
|-
| 12
|  -1.96
|  13.69
|  31.17
|  48.68
| -40.53
|-
| 13
|  39.55
| -18.51
| -49.56
|  2.74
| -10.57
|-
| 14
| -18.95
|  49.30
| -30.30
| -43.20
|  19.38
|}
|}
To me the percent values look more familiar and the grouping is better (at maximum pairs of numbers) --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 19:07, 15 May 2020 (UTC)
BTW: the [[Python]] script to produce the two tables above (except for the percent and permille symbols) is as follows:
<syntaxhighlight lang="python">
import math
primes = [2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31]
def rel_err(p, edo):
    v = math.log(p) / math.log(2) * edo
    t = round(v)
    e = (t-v)
    return e
def edo_primes(edo_min, edo_max, primes, unit):
    pot = unit[0]
    precision = 4-pot
    scale = 10 ** (pot)
    print('{| class="wikitable sortable mw-collapsible" style="text-align:right"')
    print('! rowspan="2" | Edo')
    print(f'! colspan="{len(primes)}" | Relative Errors (in {unit[1]})')
    print('|-')
    for p in primes:
        print(f'! {p:2}/1')
    for edo in range(edo_min, edo_max):
        print('|-')
        print(f'| {edo:2}')
        for p in primes:
            print (f'| {rel_err(p, edo)*scale:6.{precision}f}')
    print('|}')
edo_primes(9, 15, primes[1:6], (3, 'permille'))
edo_primes(9, 15, primes[1:6], (2, 'percent'))
</syntaxhighlight>
--[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 20:48, 15 May 2020 (UTC)
: Cool. A cent is really a cent in 12-edo. Why didn't I see that. And I get the idea of the program. I can do the other table on my own. [[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 20:06, 16 May 2020 (UTC)
== change from h1 to h2 headings in article body ==
I plead for the restriction to h2 headings in the article body, and reserve h2 headings for the article title. If you know this great feature in Wikipedia (it's currently not provided in this Wiki but probably will in future), you will know that - as a user - you can export a very book-like presentation of a handpicked collection of articles as PDF. --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 19:22, 15 May 2020 (UTC)
: But what about the table of contents? [[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 20:06, 16 May 2020 (UTC)
:: I'm not sure what you mean: 1) If you wish to have a toc on the page: add <code><nowiki>__TOC__</nowiki></code> right after the synopsys. 2) If you think about book export: I'd expect that this is done for the articles included. For this, I have to check the function on Wikipedia again. --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 10:55, 17 May 2020 (UTC)
:: As I saw right now, the book generator provided by some of the Wikipedias (German, Polish, Russion, etc.) is currently under construction. So I cannot test how the table of contents looks like. I remember that I tested this function some years ago and it worked quite well... --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 11:04, 17 May 2020 (UTC)
::: I have to correct this. The book generator is still working, but currently doesn't provide the free PDF download. The book generator function for the English Wikipedia can be found via ''Special pages &rarr; Page tools &rarr; Book''. By clicking on "Book", you enable a section above the title section for the whole domain '''wikipedia.org''' (so also if you change to a Wikipedia of a different languages) which provides the function to add articles to your current book(s) (it's a bit confusing that there is one book per language). If you are ready, you may purchase a copy, but you have a preview there that shows you that you get a title, table of contents, the actual contents, index, appendix. I find this an interesting experience, hard to (check and) tell all the details. Better have a look yourself. --[[User:Xenwolf|Xenwolf]] ([[User talk:Xenwolf|talk]]) 11:40, 17 May 2020 (UTC)
::: Thanks. I'd just like to have a toc on the page. [[User:FloraC|FloraC]] ([[User talk:FloraC|talk]]) 13:08, 17 May 2020 (UTC)
Return to "Relative errors of small EDOs" page.