Jump to content

Help talk:Round

Add topic
From Meta, a Wikimedia project coordination wiki
Latest comment: 15 days ago by Network-charles in topic I Suggest We Export These Templates to Mediawiki

I Suggest We Export These Templates to Mediawiki[edit]

Hi @Pppery, these templates on this page look helpful. It would be great if they were available to users on MediaWiki. Initially, I thought only Template:Xpd and Template:Xpsoc were needed on MediaWiki, but after reconsideration, I realized that all the templates should be exported. Network-charles (talk) 18:44, 12 June 2024 (UTC)Reply

I wouldn't for this page. For this page, it would probably be better to merge any examples here that aren't already in the table at mw:Help:Extension:ParserFunctions#Rounding to that page using its existing style rather than importing more templates from Meta. Ditto Help:Mod, round, floor, ceil, trunc, Help:Calculation, etc. * Pppery * it has begun 00:24, 13 June 2024 (UTC)Reply
Thanks for the clarification, @Pppery. I agree, those examples are great. Network-charles (talk) 00:29, 13 June 2024 (UTC)Reply
I've transferred an example from this page to mw:Help:Extension:ParserFunctions#Rounding.
Now that we aren't creating new templates on MediaWiki, I don't think there's a need to create a separate equivalent of this page on MediaWiki, mw:Help:Extension:ParserFunctions#Rounding looks sufficient. Also, since only one page (m:Help:Mod, round, floor, ceil, trunc) links to this page, we can reference mw:Help:Extension:ParserFunctions#Rounding when creating a MediaWiki equivalent of m:Help:Mod, round, floor, ceil, trunc.
What do you think? Network-charles (talk) 08:01, 14 June 2024 (UTC)Reply
I also didn't transfer examples using m:Help:Round/1 because it uses Template:Numf which isn't available on MediaWiki. Network-charles (talk) 08:20, 14 June 2024 (UTC)Reply
Honestly I'd be inclined to consolidate all of Help:Round, Help:Mod, round, floor, ceil, trunc, Help:Calculation and mw:Help:Extension:ParserFunctions##expr into one page at something like mw:Help:Parser function expressions. * Pppery * it has begun 22:03, 14 June 2024 (UTC)Reply
I've migrated Help:Calculation accuracy to mw:Manual:Floating-point errors in expr parser function relatively unchanged, and as a result imported a bunch of templates, including {{numf}} over to Meta. Honestly it's not really fair that you have read through and deal with all of this ancient technobabble, but it is what it is. Before using any of these templates, though, consider whether the examples they relate to are really necessary or whether the target page already has enough examples and the number of people who care about the fine points of floating number representation relative to those just trying to get their expression working is very low. * Pppery * it has begun 22:25, 14 June 2024 (UTC)Reply
Great work, Pppery. I'll keep that in mind. Network-charles (talk) 04:28, 15 June 2024 (UTC)Reply
And I'm also going to warn you in advance: many of those pages on Meta were written using very baroque template syntaxes. For that page which I've now called mw:Manual:Representation of numbers in expr parser function I just gave up and imported the template machinery from Meta unchanged because nothing else was worth my time, but for the other pages that aren't as obscure geekery it may be better to just paste the Meta content into Special:ExpandTemplates before reviewing it to get to the bottom of the matter without templates getting in the way. * Pppery * it has begun 04:42, 15 June 2024 (UTC)Reply
Thanks for clarifying, Pppery. Looking at Template:Evaldemo ({{evaldemo|#expr: 30/7 round 0}}) for example, It looks complicated when it's just like other expr parse functions. I guess it was created only for demo purposes, hence making its use limited.
What do you think about this template though, Template:Rnd ({{rnd|123456789012345669|-1}})? It's quite nice, but it's not an expr parse function. Its implementation is also beyond demo purposes. A part of its expression evaluates to something like this <math>10^{17}</math>? Network-charles (talk) 06:03, 15 June 2024 (UTC)Reply
{{Evaldemo}} is a redirect to {{Xpd}} which already exists on MediaWiki.org. Not sure what to make of {{rnd}} but it looks vaguely reasonable to import in principle. For this page, though, I would just delete the example "{{rnd|123456789012345669|-1}} → 1.2345678901235×1017" because it seems to just be a more complicated version of the previous example adding no additional clarity. * Pppery * it has begun 13:41, 15 June 2024 (UTC)Reply
Ah, thanks, I didn't know about the Xpd template.
The ”rnd” template example is different from the previous example which is a hex representation of the digits passed as a parameter. Network-charles (talk) 14:23, 15 June 2024 (UTC)Reply
This “rnd” template is an exponential number representation of the digits passed as a parameter. Network-charles (talk) 14:25, 15 June 2024 (UTC)Reply
But the level of template indirection in it is so high that it's documenting the template itself as much as it is documenting the #expr function that you're trying to document. * Pppery * it has begun 14:47, 15 June 2024 (UTC)Reply
Ok, thanks for clarifying. Network-charles (talk) 16:15, 15 June 2024 (UTC)Reply