User:Plumtree/Infobox Interval: Difference between revisions
mNo edit summary |
mNo edit summary |
||
| Line 12: | Line 12: | ||
There are three different ways to use this template: | There are three different ways to use this template: | ||
* Small ratios: <code><nowiki>{{Infobox Interval}}</nowiki></code> (the ratio is inferred from page name), <code><nowiki>{{Infobox Interval|7/4}}</nowiki></code>, <code><nowiki>{{Infobox Interval|Ratio=7/4}}</nowiki></code>. | * Small ratios: <code><nowiki>{{Infobox Interval}}</nowiki></code> (the ratio is inferred from page name), <code><nowiki>{{Infobox Interval|7/4}}</nowiki></code>, <code><nowiki>{{Infobox Interval|Ratio=7/4}}</nowiki></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 when those are <math>\leq 2^{32}</math>, and you might happen to not encounter any problems when those are <math>\leq 2^{53}</math>. 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 when those are <math>\leq 2^{32}</math>, and you might happen to not encounter any problems when those are <math>\leq 2^{53}</math>. With larger numbers, you are almost guaranteed to get inaccurate results. | ||
* Large ratios: <code><nowiki>{{Infobox Interval|Ket=-2 0 0 1}}</nowiki></code>, <code><nowiki>{{Infobox Interval|Monzo=-2 0 0 1}}</nowiki></code>. | * Large ratios: <code><nowiki>{{Infobox Interval|Ket=-2 0 0 1}}</nowiki></code>, <code><nowiki>{{Infobox Interval|Monzo=-2 0 0 1}}</nowiki></code>. | ||
** In this form, '''Ratio''' and '''Norms''' are omitted | ** In this form, '''Ratio''' and '''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><nowiki>{{Infobox Interval|Ratio=π|Cents=1981.795}}</nowiki></code>. | * Irrational intervals: <code><nowiki>{{Infobox Interval|Ratio=π|Cents=1981.795}}</nowiki></code>. | ||