Template:Pow

From Meta, a Wikimedia project coordination wiki
Jump to: navigation, search

This template provides an expression for a power. It checks whether base and exponent both have an integer value. If so, they are converted to type integer and Template:Powint is applied, otherwise the power is applied directly.

Thus the highest accuracy is achieved, and the result is of type integer where possible, for display and accurate subsequent computations.

Usage: {{powint|base|power}}

Examples:

  • {{pow|257|7}} → (257)^(7)
  • {{pow|257.3|7}} → (257.3)^(7)
  • {{pow|257|7.1}} → (257)^(7.1)
  • {{pow|257|8}} → (257)^(8)
  • {{numfh|(257)^(7)}} → 74,051,159,531,521,792 (ca. 7.4e16) 1.0715232315070hex*2^56
  • {{numfh|(257.3)^(7)}} → 74,658,369,937,402,752 (ca. 7.5e16) 1.093d6453a0eb8hex*2^56
  • {{numfh|(257)^(7.1)}} → 128,980,832,473,546,560 (ca. 1.3e17) 1.ca3b623e6b7f4hex*2^56
  • {{numfh|(257)^(8)}} → 19,031,147,999,601,104,000 (ca. 1.9e19) 1.081c3846381c1hex*2^64
Personal tools
Namespaces

Variants
Actions
Navigation
Community
Beyond the Web
Toolbox