Template:Resratio and Template:Resratio/sandbox: Difference between pages
(Difference between pages)
Content deleted Content added
m sort |
fix the gcd functions to not activate when the values are not integers |
||
Line 1: | Line 1: | ||
<onlyinclude>{{#switch:{{lc:{{#iferror:{{#expr:{{{r|on}}}}}|{{#iferror:{{#expr:{{{x|{{{1|0}}}}}}/{{{y|{{{2|1}}}}}}}}|{{{x|{{{1}}}}}}|{{#expr:({{{x|{{{1|0}}}}}}/{{{y|{{{2|1}}}}}}) round 3}}}}}}}} |
<onlyinclude>{{#switch:{{lc:{{#iferror:{{#expr:{{{r|on}}}}}|{{#iferror:{{#expr:{{{x|{{{1|0}}}}}}/{{{y|{{{2|1}}}}}}}}|{{{x|{{{1}}}}}}|{{#expr:({{{x|{{{1|0}}}}}}/{{{y|{{{2|1}}}}}}) round 3}}}}}}}} |
||
| |
|1:1|1|1.0|1.00|1.000|square|q={{#if:{{{f|}}}|1|{{sort|1.0|1∶1}}}} |
||
| |
|7:6|1.166|1.167={{#if:{{{f|}}}|1.167|{{sort|1.1667|7∶6}}}} |
||
| |
|13:11|1.181|1.182={{#if:{{{f|}}}|1.1818|{{sort|1.1818|13∶11}}}} |
||
| |
|6:5|12:10|18:15|1.2|1.20|1.200|fox|movietone={{#if:{{{f|}}}|1.2|{{sort|1.2|6∶5}}}} |
||
| |
|11:9|1.22|1.222={{#if:{{{f|}}}|1.222|{{sort|1.222|11∶9}}}} |
||
| |
|5:4|10:8|15:12|1.25|1.250|super|s={{#if:{{{f|}}}|1.25|{{sort|1.25|5∶4}}}} |
||
| |
|32:25|1.280={{#if:{{{f|}}}|1.28|{{sort|1.28|32∶25}}}} |
||
| |
|4:3|12:9|16:12|8:6|1.33|1.333|1.334|tv|sd|sdtv={{#if:{{{f|}}}|1.333|{{sort|1.3333|4∶3}}}} |
||
| |
|11:8|22:16|1.375|academy={{#if:{{{f|}}}|1.375|{{sort|1.375|4∶3}}}} |
||
| |
|7:5|14:10|1.4|1.40|1.400={{#if:{{{f|}}}|1.400|{{sort|1.4|7∶5}}}} |
||
| |
|10:7|70:49|1.43|1.428|1.429|imax={{#if:{{{f|}}}|1.429|{{sort|1.43|10∶7}}}} |
||
| |
|13:9|1.44|1.444={{#if:{{{f|}}}|1.444|{{sort|1.4444|13∶9}}}} |
||
| |
|22:15|1.467={{#if:{{{f|}}}|1.467|{{sort|1.4667|22∶15}}}} |
||
| |
|3:2|6:4|9:6|12:8|15:10|18:12|1.5|1.50|1.500|35mm|photo|foto={{#if:{{{f|}}}|1.5|{{sort|1.5|3∶2}}}} |
||
| |
|14:9|1.56|1.556|1.555|ad={{#if:{{{f|}}}|1.555|{{sort|1.5556|14∶9}}}} |
||
| |
|25:16|1.563|1.562|1.5625|plus|p={{#if:{{{f|}}}|1.562|{{sort|1.5625|25∶16}}}} |
||
| |
|8:5|16:10|1.6|1.60|1.600|laptop|wide|w={{#if:{{{f|}}}|1.6|{{sort|1.6|8∶5}}}} |
||
| |
|5:3|10:6|15:9|20:12|1.67|1.666|1.667|cinema|16mm|super16={{#if:{{{f|}}}|1.666|{{sort|1.6667|5∶3}}}} |
||
| |
|7:4|14:8|21:12|1.75|1.750={{#if:{{{f|}}}|1.75|{{sort|1.75|7∶4}}}} |
||
| |
|16:9|1.77|1.78|1.777|1.778|hd|hdtv={{#if:{{{f|}}}|1.777|{{sort|1.7778|16∶9}}}} |
||
| |
|9:5|18:10|1.8|1.80|1.800={{#if:{{{f|}}}|1.8|{{sort|1.8|9∶5}}}} |
||
| |
|37:20|17:9|1.89|1.888|1.889|1.850|movie={{#if:{{{f|}}}|1.85|{{sort|1.85|1.85∶1}}}} |
||
| |
|19:10|1.9|1.90|1.900|dmr|dci|4k|2k={{#if:{{{f|}}}|1.9|{{sort|1.9|1.90∶1}}}} |
||
| |
|2:1|20:10|18:9|2.0|2.00|2.000|2.001|2.002|2.003|1.997|1.998|1.999|univisium={{#if:{{{f|}}}|2.0|{{sort|2.0|2∶1}}}} |
||
| |
|18.5:9|37:18|2.055|2.06|2.056={{#if:{{{f|}}}|2.055|{{sort|2.0556|18½∶9}}}} |
||
| |
|19:9|21:10|2.111|2.110|2.100={{#if:{{{f|}}}|2.1|{{sort|2.1|2.10∶1}}}} |
||
| |
|11:5|22:10|2.2|2.20|2.21|2.201|2.202|2.203|2.204|2.205|2.206|2.207|2.208|2.209|2.210|70mm={{#if:{{{f|}}}|2.21|{{sort|2.21|2.21∶1}}}} |
||
| |
|20:9|2.22|2.222={{#if:{{{f|}}}|2.222|{{sort|2.2222|20∶9}}}} |
||
| |
|21:9|7:3|14:6|64:27|43:18|12:5|2.333|2.37|2.370|cubed|uw|ultrawide|ultra={{#if:{{{f|}}}|2.37|{{sort|2.3704|21∶9}}}} |
||
| |
|47:20|26:11|1678/715|2.3468|2.35|2.36|2.38|24:10|419/175|2.390|55/23|2.391|2.392|2.393|2.394|2.395|2.396|2.397|2.398|2.399|2.400|scope|anamorphic|panavision={{#if:{{{f|}}}|2.39|{{sort|2.39|2.35∶1}}}} |
||
| |
|10:11|30:33|90:99|11:10|1.1={{#if:{{{f|}}}|1.1|{{sort|1.1|11∶10}}}} |
||
| |
|12:11|36:33|108:99|1.091|1.090={{#if:{{{f|}}}|1.0909|{{sort|1.0909|12∶11}}}} |
||
| |
|40:33|120:99|1.212={{#if:{{{f|}}}|1.2121|{{sort|1.2121|13⅓∶11}}}} |
||
| |
|15:11|45:33|135:99|1.364|1.363={{#if:{{{f|}}}|1.3636|{{sort|1.3636|15∶11}}}} |
||
|16:11|48:33|144:99|1.455|1.454={{#if:{{{f|}}}|1.4545|{{sort|1.4545|16∶11}}}} |
|||
|47:20|26:11|1678/715|2.3468|2.35|2.36|24:10|419/175|2.390|55/23|2.391|2.392|2.393|2.394|2.395|2.396|2.397|2.398|2.399|2.400|scope|anamorphic|panavision={{#switch:{{{f|}}}|#default=2.39|9={{sort|2.39|21½∶9}}|5={{sort|2.40|12∶5}}||10={{sort|2.40|24∶10}}|1|={{sort|2.39|2.35∶1}}}} |
|||
| |
|160:99|1.616={{#if:{{{f|}}}|1.6161|{{sort|1.6161|{{frac|17|7|9}}∶11}}}} |
||
| |
|17:11|1.54|1.55|1.545|1.5454|1.5455={{#if:{{{f|}}}|1.5454|{{sort|1.5454|17∶11}}}} |
||
| |
|18:11|54:33|162:99|1.636={{#if:{{{f|}}}|1.6363|{{sort|1.6363|18∶11}}}} |
||
| |
|20:11|60:33|180:99|1.818={{#if:{{{f|}}}|1.8181|{{sort|1.8181|20∶11}}}} |
||
| |
|64:33|192:99|1.939={{#if:{{{f|}}}|1.9393|{{sort|1.9393|21⅓∶11}}}} |
||
| |
|24:11|72:33|216:99|2.182|2.181={{#if:{{{f|}}}|2.1818|{{sort|2.1818|24∶11}}}} |
||
| |
|80:33|240:99|2.424={{#if:{{{f|}}}|2.4242|{{sort|2.4242|26⅔∶11}}}} |
||
| |
|32:11|96:33|288:99|2.909={{#if:{{{f|}}}|2.9090|{{sort|2.9090|32∶11}}}} |
||
| |
|2.997|2.998|2.999|3.000|3.001|3.002|3.003={{#if:{{{f|}}}|3.0|{{sort|3.0|3∶1}}}} |
||
| |
|3.997|3.998|3.999|4.000|4.001|4.002|4.003={{#if:{{{f|}}}|4.0|{{sort|4.0|4∶1}}}} |
||
| |
|4.997|4.998|4.999|5.000|5.001|5.002|5.003={{#if:{{{f|}}}|5.0|{{sort|5.0|5∶1}}}} |
||
| |
|5.997|5.998|5.999|6.000|6.001|6.002|6.003={{#if:{{{f|}}}|6.0|{{sort|6.0|6∶1}}}} |
||
| |
|6.997|6.998|6.999|7.000|7.001|7.002|7.003={{#if:{{{f|}}}|7.0|{{sort|7.0|7∶1}}}} |
||
| |
|7.997|7.998|7.999|8.000|8.001|8.002|8.003={{#if:{{{f|}}}|8.0|{{sort|8.0|8∶1}}}} |
||
| |
|8.997|8.998|8.999|9.000|9.001|9.002|9.003={{#if:{{{f|}}}|9.0|{{sort|9.0|9∶1}}}} |
||
|phi|gold|golden|φ|ϕ|13:8|21:13|34:21|1.625|1.61|1.62|1.618|1.6180={{#if:{{{f|}}}|1.6180339887498948482045868343656|{{sort|1.6180|2=<abbr title="Golden Ratio: ½ + √1¼ ≈ 1.618034">ϕ</abbr>∶1}}}} |
|||
|4.997|4.998|4.999|5.000|5.001|5.002|5.003={{#switch:{{{f|}}}|#default=5.0|1|={{sort|5.0|5∶1}}}} |
|||
|1+√2|√2+1|silver|ds|sqrt2+1|sqrt2p1|delta|δ|2.41|2.414|2.4142={{#if:{{{f|}}}|2.4142135623730950488016887242097|{{sort|2.4142|2=<abbr title="Silver Ratio: 1 + √2 ≈ 2.414214">δ<sub>S</sub></abbr>∶1}}}} |
|||
|5.997|5.998|5.999|6.000|6.001|6.002|6.003={{#switch:{{{f|}}}|#default=6.0|1|={{sort|6.0|6∶1}}}} |
|||
|plastic|siegel|rho|53:40|1.325|1.3247={{#if:{{{f|}}}|1.3247179572447460259609088544781|{{sort|1.3247|2=<abbr title="Plastic Ratio: ∛(½ + √(69)/18) + ∛(½ - √(69)/18) ≈ 1.324718">ρ</abbr>∶1}}}} |
|||
|6.997|6.998|6.999|7.000|7.001|7.002|7.003={{#switch:{{{f|}}}|#default=7.0|1|={{sort|7.0|7∶1}}}} |
|||
|√2|sqrt|sqrt2|sqrttwo|pythagoras|lichtenberg|paper|iso|din|17:12|24:17|1.41|1.42|1.414|1.4142={{#if:{{{f|}}}|1.4142135623730950488016887242097|{{sort|1.4142|2=<abbr title="≈ 1.414214, 2∶√2">√2</abbr>∶1}}}} |
|||
|7.997|7.998|7.999|8.000|8.001|8.002|8.003={{#switch:{{{f|}}}|#default=8.0|1|={{sort|8.0|8∶1}}}} |
|||
| |
|1.5√2|2.12|2.121|2.122|2.1213|2.1214={{#if:{{{f|}}}|2.1213203435596425732025330863145|{{sort|2.1213|2=<abbr title="1½·√2 = √4½ ≈ 2.121320">3∶√2</abbr>}}}} |
||
| |
|2√2|√8|2*sqrt2|2.82|2.83|2.828|2.8284|2.8285={{#if:{{{f|}}}|2.8284271247461900976033774484194|{{sort|2.8284|2=<abbr title="2·√2 = √8 ≈ 2.828427">4∶√2</abbr>}}}} |
||
| |
|2.5√2|3.54|3.53|3.535|3.536|3.5355|3.5356={{#if:{{{f|}}}|3.5355339059327376220042218105242|{{sort|3.5355|2=<abbr title="2½·√2 = √12½ ≈ 3.535534">5∶√2</abbr>}}}} |
||
| |
|3√2|√18|3*sqrt2|4.24|4.25|4.242|4.243|4.2426|4.2427={{#if:{{{f|}}}|4.2426406871192851464050661726291|{{sort|4.2426|2=<abbr title="3·√2 = √18 ≈ 4.242641">6∶√2</abbr>}}}} |
||
| |
|3.5√2|4.95|4.949|4.950|4.9497|4.9498={{#if:{{{f|}}}|4.9497474683058326708059105347339|{{sort|4.9497|2=<abbr title="3½·√2 = √24½ ≈ 4.949747">7∶√2</abbr>}}}} |
||
| |
|4√2|√32|4*sqrt2|5.65|5.66|5.656|5.657|5.6568|5.6569={{#if:{{{f|}}}|5.6568542494923801952067548968388|{{sort|5.6569|2=<abbr title="4·√2 = √32 ≈ 5.656854">8∶√2</abbr>}}}} |
||
| |
|4.5√2|6.36|6.37|6.363|6.364|6.3639|6.3640={{#if:{{{f|}}}|6.3639610306789277196075992589436|{{sort|3.5355|2=<abbr title="4½·√2 = √40½ ≈ 6.3639610">9∶√2</abbr>}}}} |
||
| |
|infty|+infty|infinity|positive infinity|+∞|∞={{#if:{{{f|}}}|Number.POSITIVE_INFINITY|{{sort|9999.9|2=<abbr title="positive infinity">+∞</abbr>∶1}}}} |
||
| |
|-infty|negative infinity|−∞|-∞={{#if:{{{f|}}}|Number.NEGATIVE_INFINITY|{{sort|-9999.9|2=<abbr title="negative infinity">−∞</abbr>∶1}}}} |
||
|3.5√2|4.95|4.949|4.950|4.9497|4.9498={{#switch:{{{f|}}}|#default=4.9497474683058326708059105347339|9={{sort|4.9497|44½∶9}}|={{sort|4.9497|2=<abbr title="3½·√2 = √24½ ≈ 4.949747">7∶√2</abbr>}}}} |
|||
|4√2|√32|4*sqrt2|5.65|5.66|5.656|5.657|5.6568|5.6569={{#switch:{{{f|}}}|#default=5.6568542494923801952067548968388|9={{sort|5.6569|51∶9}}|={{sort|5.6569|2=<abbr title="4·√2 = √32 ≈ 5.656854">8∶√2</abbr>}}}} |
|||
|4.5√2|6.36|6.37|6.363|6.364|6.3639|6.3640={{#switch:{{{f|}}}|#default=6.3639610306789277196075992589436|9={{sort|6.3639|57¼∶9}}|={{sort|6.3639|2=<abbr title="4½·√2 = √40½ ≈ 6.3639610">9∶√2</abbr>}}}} |
|||
|infty|+infty|infinity|positive infinity|+∞|∞={{#switch:{{{f|}}}|#default=Number.POSITIVE_INFINITY|1|={{sort|9999.9|2=<abbr title="positive infinity">+∞</abbr>∶1}}}} |
|||
|-infty|negative infinity|−∞|-∞={{#switch:{{{f|}}}|#default=Number.NEGATIVE_INFINITY|1|={{sort|-9999.9|2=<abbr title="negative infinity">−∞</abbr>∶1}}}} |
|||
|0|0.000={{sort|0.0|{{{y|{{{2|0}}}}}}}} |
|0|0.000={{sort|0.0|{{{y|{{{2|0}}}}}}}} |
||
|=''x''∶{{#ifeq:{{{y|{{{2| |
|=''x''∶{{#ifeq:{{{y|{{{2|}}}}}}||''y''|{{{y|{{{2|''y''}}}}}}}} |
||
|#default={{{r|{{#iferror:{{#expr:{{{x|{{{1|0}}}}}}+{{{y|{{{2|0}}}}}}}}|{{{x|{{{1|}}}}}}{{#if:{{{y|{{{2|}}}}}}|∶{{{y|{{{2|}}}}}}|}}|{{#ifeq:{{{y|{{{2|0}}}}}}|0|{{{x|{{{1|{{{y|{{{2|—}}}}}}}}}}}}|{{# |
|#default={{{r|{{#iferror:{{#expr:{{{x|{{{1|0}}}}}}+{{{y|{{{2|0}}}}}}}}|{{{x|{{{1|}}}}}}{{#if:{{{y|{{{2|}}}}}}|∶{{{y|{{{2|}}}}}}|}}|{{#ifeq:{{{y|{{{2|0}}}}}}|0|{{{x|{{{1|{{{y|{{{2|—}}}}}}}}}}}}|{{if both <!-- make sure x and y are integers and not decimal values, gcd only works with integers --> |
||
|{{#ifeq:{{round|{{{x|{{{1|0}}}}}}}}|{{{x|{{{1|0}}}}}}|1|}} |
|||
|{{#ifeq:{{round|{{{y|{{{2|0}}}}}}}}|{{{y|{{{2|0}}}}}}|1|}} |
|||
|{{#expr: |
|||
({{{x|{{{1|0}}}}}})/{{#invoke:Math|gcd|({{{x|{{{1|0}}}}}})|({{{y|{{{2|1}}}}}})}} |
|||
}}∶{{#expr: |
|||
({{{y|{{{2|0}}}}}})/{{#invoke:Math|gcd|({{{x|{{{1|0}}}}}})|({{{y|{{{2|1}}}}}})}} |
|||
}} |
|||
|{{{x|{{{1|}}}}}}{{#if:{{{y|{{{2|}}}}}}|∶{{{y|{{{2|}}}}}}|}} |
|||
}} |
|||
}}}}}}} |
|||
}}</onlyinclude><noinclude> |
}}</onlyinclude><noinclude> |
||
{{documentation}} |
{{documentation}} |