Jump to content

Template:PH wikidata/power/doc

From Wikipedia, the free encyclopedia

Usage

[edit]

A helper sub from PH wikidata
it takes a number, such as area (e.g. of land). It sends the power of the square root, in stages:

{| style="text-align:right;margin:1 0 1 3em;"
! colspan=3 | area <= 4{{sup|n}}
! colspan=3 | &nbsp;&nbsp;dim == 2{{sup|n}}
|-
| || 4{{sup|0}} || 1 ||&nbsp;&nbsp;|| 2{{sup|0}} || 1
|-
| [ || 4{{sup|1}} || 4 || || 2{{sup|1}} || 2 || ]
|-
| || 4{{sup|2}} || 16 || || 2{{sup|2}} || 4
|-
| || 4{{sup|3}} || 64 || || 2{{sup|3}} || 8
|-
| || 4{{sup|4}} || 256 || || 2{{sup|4}} || 16
|-
| || 4{{sup|5}} || 1024 || || 2{{sup|5}} || 32
|-
| || 4{{sup|6}} || 4096 || || 2{{sup|6}} || 64
|-
| || 4{{sup|7}} || 16384 || || 2{{sup|7}} || 128
|-
| || || else || || 2{{sup|8}} || 256
|}

area <= 4n   dim == 2n
40 1    20 1
[ 41 4 21 2 ]
42 16 22 4
43 64 23 8
44 256 24 16
45 1024 25 32
46 4096 26 64
47 16384 27 128
else 28 256

Cf ƒ-stop