Template talk:Order of magnitude

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

Please replace it with the following revised code.

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)
replies: text: 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? Happy‑melon 16:29, 3 June 2008 (UTC)
thread_title: Improved version

message: This template incorrectly shows hyphens where minus signs belong.  Thus:
: 
: 10-300
: 
instead of this:
: 
: 10−300
: 
I clicked on "edit" to correct this, but there's just some code that I couldn't follow.  Can anyone attend to this? Michael Hardy (talk) 02:33, 10 October 2008 (UTC)
replies: text: You mean the documentation, right?  I've fixed it.  If you meant the actual template output, the hyphen as a minus sign is intentional: it's to be used in other templates. JIMp talk·cont 05:08, 11 October 2008 (UTC)
thread_title:  Error in this template 

message: :: WARNING: The change below probably affects almost all articles using Template:Convert, so it will trigger reformatting over 250,000(?) articles. It can wait until a slow day on Wikipedia, such as a Friday night, Saturday or Sunday. There is no hurry on this. -Wikid77
14-Feb-09: The template must use parentheses around {1} before the division with 10^{2}, so that parameter1 can allow an expression of addends (such as 100+2+3); the proper coding should use parentheses before division, as: (  )/10^. Also, set the category [Category:...].
The contents of the template should be the following 3 lines:

Category:Subtemplates of Template Convert

When working properly, the current results, below, will match the expected:
:* Expected:    gives:   3
:* Currently:    gives:   
:* Expected:    gives:   3
:* Currently:    gives:   
:* Expected:    gives:   4
:* Currently:    gives:   
:* Expected:    gives:   4
:* Currently:    gives:   
:* Expected:    gives:   1
:* Currently:    gives:   
:* Currently:    gives:   
For each case, the amounts of Expected & Currently should match: with the same result whether for 1000+2 or 2+1000. The correct calculation requires parentheses "( )" be used around parameter {1} to handle any addends in the input number, such as in "1000+2". -Wikid77 (talk) 11:52, 14 February 2010 (UTC)
replies: text: after checking the jobqueue. (The 3 db servers combined had a jobqueue of around 2780 jobs before deploying this change). —TheDJ (talk • contribs) 23:56, 14 February 2010 (UTC)
thread_title: Parentheses are needed to handle additions

message: Wikid has come up with a new way of dealing with the truncation error.  The new code avoids the need for the correction subtemplate  and thus cuts the depth from seven to four.  The new code is now in place.  A very very slight dissadvantage has been discovered: as we approach 1 the new code fails earlier (somewhere between 0.99999999999997 and 0.99999999999998) giving 0 (as opposed to -1) whereas the old code was good until a little closer to 1 (failing somewhere between 0.99999999999999994 and 0.99999999999999995).  This is not likely to cause trouble. JIMp talk·cont 23:48, 26 September 2012 (UTC)
replies: text: The fudge factor which was introduced to counter the truncation error becomes insignificant for larger/smaller orders of magnitude (over 100 or under −100) and the template has been returning 299 for 1E300.  Thus I tried bumping the fudge factor up a notch for these numbers in the sandbox. The sandbox version now correctly gives 300 for 1E300.  I'm putting the new code (as follows) in.

JIMp talk·cont 23:12, 11 November 2012 (UTC)
thread_title:  Reducing the expansion level depth