In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-04-02 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly explains "how to write the calculation formula of power in php". Interested friends may wish to have a look. The method introduced in this paper is simple, fast and practical. Next, let the editor take you to learn how to write the calculation formula of several powers in php.
The formula for calculating the power in PHP is "$x=pow (base, index);", and the value of the variable x is the result of the power calculation. The pow () function calculates and returns the result of the specified number to the specified power, the first parameter specifies the bottom of the exponential expression, the second parameter specifies the power of the exponential expression, and if it cannot be calculated, the result returned is NAN.
This article operating environment: Windows10 system, PHP7.1 version, Dell G3 computer.
The calculation Formula of several Power in php
The calculation formula is as follows:
$x=pow (base, index)
Function: the function of the pow () function is to calculate a number to the nth power and return it.
Syntax:
Pow (XQuery Y)
Parameters:
X represents the number to be processed
Y represents the n value in the specified n power.
Description: returns the Y power of X. if the parameter is correct, the function will return a numeric value. If it cannot be calculated, it will return NAN.
Examples are as follows:
Output result:
At this point, I believe you have a deeper understanding of "how to write the calculation formula of power in php". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.