Template:Infobox interval/doc: Difference between revisions

ArrowHead294 (talk | contribs)
m Remove extraneous nowiki tag
ArrowHead294 (talk | contribs)
mNo edit summary
Line 2: Line 2:
=== Usage ===
=== Usage ===
There are three different ways to use this template:
There are three different ways to use this template:
* Small ratios: <code>{{((}}Infobox Interval{{))}}</code> (the ratio is inferred from page name), <code>{{((}}Infobox Interval{{!}}7/4{{))}}</code>, <code>{{((}}Infobox Interval{{!}}Ratio=7/4{{))}}</code>.
* Small ratios: <code>{{<nowiki />Infobox Interval}}</code> (the ratio is inferred from page name), <code>{{<nowiki />Infobox Interval|7/4}}</code>, <code>{{<nowiki />Infobox Interval|Ratio=7/4}}</code>.
** When use this form? In most cases, whenever both numerator and denominator of the ratio are small enough to fit within Lua numbers as integers. You should not encounter any problems with integers up to {{nowrap|2<sup>32</sup> &minus; 1}}, and you might happen to not encounter any problems when those are 2<sup>53</sup>. With larger numbers, you are almost guaranteed to get inaccurate results.
** When use this form? In most cases, whenever both numerator and denominator of the ratio are small enough to fit within Lua numbers as integers. You should not encounter any problems with integers up to {{nowrap|2<sup>32</sup> &minus; 1}}, and you might happen to not encounter any problems when those are 2<sup>53</sup>. With larger numbers, you are almost guaranteed to get inaccurate results.
* Large ratios: <code>{{((}}Infobox Interval{{!}}Ket=-2 0 0 1}}</code>, <code>{{((}}Infobox Interval{{!}}Monzo=-2 0 0 1{{))}}</code>.
* Large ratios: <code>{{<nowiki />Infobox Interval|Ket=-2 0 0 1}}</code>, <code>{{<nowiki />Infobox Interval|Monzo=-2 0 0 1}}</code>.
** In this form, '''Ratio''' (unless you specify it explicitly, in which case it will be printed as is) and most norms are omitted.
** In this form, '''Ratio''' (unless you specify it explicitly, in which case it will be printed as is) and most norms are omitted.
** When use this form? Whenever numerator or denominator are too large.
** When use this form? Whenever numerator or denominator are too large.
* Irrational intervals: <code>{{((}}Infobox Interval{{!}}Ratio=\pi{{!}}Cents=1981.795{{))}}</code>.
* Irrational intervals: <code>{{<nowiki />Infobox Interval|Ratio=\pi|Cents=1981.795}}</code>.
** In this form, '''Factorization''', '''Subgroup''', '''Monzo''' (unless you specify it explicitly), '''FJS name''', norms are omitted.
** In this form, '''Factorization''', '''Subgroup''', '''Monzo''' (unless you specify it explicitly), '''FJS name''', norms are omitted.
** When use this form? Whenever the interval is irrational.
** When use this form? Whenever the interval is irrational.