ebooksgratis.com

See also ebooksgratis.com: no banners, no cookies, totally FREE.

CLASSICISTRANIERI HOME PAGE - YOUTUBE CHANNEL
Privacy Policy Cookie Policy Terms and Conditions
Template talk:Ordomag - Wikipedia, the free encyclopedia

Template talk:Ordomag

From Wikipedia, the free encyclopedia

[edit] Use

Gives the number of digits before the point, minus one.

Examples:

Invalid argument for ln: <= 0 -4 -3 -2 -1 0 1 2 3 4

[edit] Improved version

{{editprotected}}

New parser functions allow for a very significant simplification of this template's (main-page) code. The current code is as follows.

{{Ordomag/+|{{#ifexpr:{{{1}}}<0|-}}{{{1}}}}}<noinclude>{{pp-template|small=yes}}{{documentation}}</noinclude>

Please replace it with the following revised code.

{{#expr:floor(ln(abs{{{1}}})/ln10)}}<noinclude>{{pp-template|small=yes}}{{documentation}}</noinclude>

There will be a number of benifits:

  • a huge reduction in reprocessor node count, post-expand include size and template argument size;
  • elimination of the need for the template's large array of subtemplates,
    • thus reducing the potential for vandalism or error;
  • an almost five-fold increase in range from 10−66 ≤ |x| ≤ 1066 to 10-324 ≤ |x| ≤ 10308 (according to testing)
  • an easy-to-follow code that could help editors learn about the use of parser funtions.

JIMp talk·cont 14:19, 3 June 2008 (UTC)

Done. Is there a sensible way to make it fail gracefully when not fed an input, or is an error message appropriate? Does this mean that the set of subtemplates can now be deleted? Happymelon 16:29, 3 June 2008 (UTC)

We could put the {{#expr:}} inside an {{#if:}} if need be. Is there anywhere transcluding this like that? If it's to get rid of the error message on the template page, then an <includeonly></includeonly> should be enough. {{Ordomag}} doesn't need the subpages any longer. However, there are a couple of other templates calling subtemplates directly so these can't be deleted yet. Please unprotect {{ordomag/+}} and {{ordomag/0}} so that they can be {{db-author}}ed once those other templates are fixed. JIMp talk·cont 21:00, 3 June 2008 (UTC)


aa - ab - af - ak - als - am - an - ang - ar - arc - as - ast - av - ay - az - ba - bar - bat_smg - bcl - be - be_x_old - bg - bh - bi - bm - bn - bo - bpy - br - bs - bug - bxr - ca - cbk_zam - cdo - ce - ceb - ch - cho - chr - chy - co - cr - crh - cs - csb - cu - cv - cy - da - de - diq - dsb - dv - dz - ee - el - eml - en - eo - es - et - eu - ext - fa - ff - fi - fiu_vro - fj - fo - fr - frp - fur - fy - ga - gan - gd - gl - glk - gn - got - gu - gv - ha - hak - haw - he - hi - hif - ho - hr - hsb - ht - hu - hy - hz - ia - id - ie - ig - ii - ik - ilo - io - is - it - iu - ja - jbo - jv - ka - kaa - kab - kg - ki - kj - kk - kl - km - kn - ko - kr - ks - ksh - ku - kv - kw - ky - la - lad - lb - lbe - lg - li - lij - lmo - ln - lo - lt - lv - map_bms - mdf - mg - mh - mi - mk - ml - mn - mo - mr - mt - mus - my - myv - mzn - na - nah - nap - nds - nds_nl - ne - new - ng - nl - nn - no - nov - nrm - nv - ny - oc - om - or - os - pa - pag - pam - pap - pdc - pi - pih - pl - pms - ps - pt - qu - quality - rm - rmy - rn - ro - roa_rup - roa_tara - ru - rw - sa - sah - sc - scn - sco - sd - se - sg - sh - si - simple - sk - sl - sm - sn - so - sr - srn - ss - st - stq - su - sv - sw - szl - ta - te - tet - tg - th - ti - tk - tl - tlh - tn - to - tpi - tr - ts - tt - tum - tw - ty - udm - ug - uk - ur - uz - ve - vec - vi - vls - vo - wa - war - wo - wuu - xal - xh - yi - yo - za - zea - zh - zh_classical - zh_min_nan - zh_yue - zu -