Template talk:Resratio

Expression error
List of common resolutions is showing "Expression error: Unrecognized punctuation character ":".∶Expression error: Unexpected / operator". I suspect that is due to recent edits at this template but I haven't had time to confirm that. At any rate, the article contains the following which shows the error if previewed in a sandbox. Perhaps it's the ".5" in s=18.5:9? I'm hoping you can fix it, thanks. Johnuniq (talk) 06:14, 5 November 2019 (UTC)
 * Indeed. The template only expects ratios of integers. I have fixed it in the article, but will also have a look at the template code. — Christoph Päper 21:01, 8 November 2019 (UTC)

use of u+2236 ratio symbol
The use of this template in the article has lead to a discussion at Talk:Paper_size. It appears that the output of this template contravenes MOS:FRAC by using u+2236 rather than a colon in its output. Martin of Sheffield (talk) 19:39, 28 October 2022 (UTC)
 * MOS:FRAC calls for a colon and the ratio symbol is a kind of colon, so I don't think this template violates the guideliones.
 * I agree with the comment that browsers should use a normalized form in their in-page search. — Christoph Päper 14:02, 3 November 2022 (UTC)
 * I do not think this is a helpful reply. Many browsers, and possibly other systems do not necessarily normalise in this way, so it would be helpful to change the character to the normal one. (I believe this is a standard MOS guideline.) Imaginatorium (talk) 18:34, 12 April 2023 (UTC)

Float output does not work for unknown aspect ratios
outputs  as it should, because   is specified. Removing  would make it output.

however, outputs  rather than. in this case makes no difference.

The first example works because it is a known ratio. Unknown ratios do not change their behaviour when  is specified. This causes an issue within Template:Resrow which requires float output so that it can use the result in an expression. Using  in an expression makes   throw an error because it does not recognise the   character.

The issue can currently be seen on List_of_common_resolutions under "Samsung feature phones".

I am currently trying to rewrite the default case over in the sandbox in order to fix this. However, it seems there is already another error in it, namely that it contains code that never runs because of a condition that is always true: an expression that is guarded by  contains a single   closing bracket but no opening one, meaning there is always an error. Said dead code doesn't even work anymore because it calls to Template:gcd which has since been removed. Beeans r swag nerds (talk) 01:02, 15 June 2023 (UTC)