Jump to content

Template:Oom2

From mediawiki.org

This template determines the log to the base 2, rounded down to an integer (binary Order Of Magnitude), of a number of type float. In other words, it determines the log to the base 2 of the number rounded down to a power of 2.

The internally representable number should not be confused with the given decimal number:

  • {{oom2|3.9999999999999999}} β†’ 2

Thus the template takes the input as representing an internally representable number, just like #expr does, as opposed to applying string operations to find the characters in the decimal notation and then find the required quantity for the exact decimal number.

  • {{oom2|1e2}} β†’ 6
  • {{oom2|1e3}} β†’ 9
  • {{oom2|1e4}} β†’ 13
  • {{oom2|1e5}} β†’ 16
  • {{oom2|1e6}} β†’ 19
  • {{oom2|1e7}} β†’ 23
  • {{oom2|1e8}} β†’ 26
  • {{oom2|1e9}} β†’ 29
  • {{oom2|1e10}} β†’ 33
  • {{oom2|1e11}} β†’ 36
  • {{oom2|1e12}} β†’ 39
  • {{oom2|1e13}} β†’ 43
  • {{oom2|1e14}} β†’ 46
  • {{oom2|1e15}} β†’ 49
  • {{oom2|1e16}} β†’ 53
  • {{oom2|1e17}} β†’ 56
  • {{oom2|1e18}} β†’ 59
  • {{oom2|1e19}} β†’ 63
  • {{oom2|1e20}} β†’ 66
  • {{oom2|trunc2^trunc53-trunc1}} β†’ 52
  • {{oom2|trunc2^trunc53}} β†’ 53
  • {{oom2|trunc2^trunc54-trunc1}} β†’ 53
  • {{oom2|trunc2^trunc54}} β†’ 54
  • {{oom2|trunc2^trunc55-trunc1}} β†’ 54
  • {{oom2|trunc2^trunc55}} β†’ 55
  • {{oom2|trunc2^trunc56-trunc1}} β†’ 55
  • {{oom2|trunc2^trunc56}} β†’ 56
  • {{oom2|trunc2^trunc57-trunc1}} β†’ 56
  • {{oom2|trunc2^trunc57}} β†’ 57
  • {{oom2|trunc2^trunc58-trunc1}} β†’ 57
  • {{oom2|trunc2^trunc58}} β†’ 58
  • {{oom2|trunc2^trunc59-trunc1}} β†’ 58
  • {{oom2|trunc2^trunc59}} β†’ 59
  • {{oom2|trunc2^trunc60-trunc1}} β†’ 59
  • {{oom2|trunc2^trunc60}} β†’ 60
  • {{oom2|trunc2^trunc61-trunc1}} β†’ 60
  • {{oom2|trunc2^trunc61}} β†’ 61
  • {{oom2|trunc2^trunc62-trunc1}} β†’ 61
  • {{oom2|trunc2^trunc62}} β†’ 62
  • {{oom2|trunc2^trunc62-trunc1+trunc2^trunc62}} β†’ 62
  • {{oom2|trunc2^trunc63}} β†’ 63
  • {{oom2|2^-900-2^-953}} β†’ -901
  • {{oom2|2^-900-2^-954}} β†’ -900
    • {{#expr:(2^-900-2^-954)-2^-900}} β†’ 0
  • {{oom2|2^1000-2^947}} β†’ 999
  • {{oom2|2^1000-2^946}} β†’ 1000
    • {{#expr:(2^1000-2^946)-2^1000}} β†’ 0
  • {{oom2|2^1000}} β†’ 1000
  • {{oom2|2^1001}} β†’ 1001
  • {{oom2|2^1002}} β†’ 1002
  • {{oom2|2^1003}} β†’ 1003
  • {{oom2|2^1004}} β†’ 1004
  • {{oom2|2^1005}} β†’ 1005
  • {{oom2|2^1006}} β†’ 1006
  • {{oom2|2^1007}} β†’ 1007
  • {{oom2|2^1008}} β†’ 1008
  • {{oom2|2^1009}} β†’ 1009
  • {{oom2|2^1010}} β†’ 1010
  • {{oom2|2^1011}} β†’ 1011
  • {{oom2|2^1012}} β†’ 1012
  • {{oom2|(2-2^-52)*2^1000}} β†’ 1000
  • {{oom2|(2-2^-52)*2^1001}} β†’ 1001
  • {{oom2|(2-2^-52)*2^1002}} β†’ 1002
  • {{oom2|(2-2^-52)*2^1003}} β†’ 1003
  • {{oom2|(2-2^-52)*2^1004}} β†’ 1004
  • {{oom2|(2-2^-52)*2^1005}} β†’ 1005
  • {{oom2|(2-2^-52)*2^1006}} β†’ 1006
  • {{oom2|(2-2^-52)*2^1007}} β†’ 1007
  • {{oom2|(2-2^-52)*2^1008}} β†’ 1008
  • {{oom2|(2-2^-52)*2^1009}} β†’ 1009
  • {{oom2|(2-2^-52)*2^1010}} β†’ 1010
  • {{oom2|(2-2^-52)*2^1011}} β†’ 1011
  • {{oom2|(2-2^-52)*2^1023}} β†’ 1023
  • {{oom2|(2-2^-52)*2^1023}} β†’ 1023
  • {{oom2|(2-2^-52)*2^1023}} β†’ 1023
  • {{oom2|2^1024}} β†’ INF
  • {{oom2|2^-1074}} β†’ -1074
  • {{oom2|2^-1075}} β†’ -1E308
  • {{oom2|0}} β†’ -1E308
  • {{#expr:2^{{oom2|2^-1075}}}} β†’ 0
  • {{#expr:2^{{oom2|0}}}} β†’ 0
  • {{oom2|2^61}} β†’ 61
  • {{oom2|trunc(2^62-512)+trunc511}} β†’ 61
  • {{oom2|2^62}} β†’ 62
  • {{oom2|1.5*2^62}} β†’ 62
  • {{oom2|trunc(2^63-1024)+trunc1023}} β†’ 62
  • {{oom2|1.5*2^63}} β†’ 63