Welcome to collectivesolver - Programming & Software Q&A with code examples. A website with trusted programming answers. All programs are tested and work.

Contact: aviboots(AT)netvision.net.il

Buy a domain name - Register cheap domain names from $0.99 - Namecheap

Scalable Hosting That Grows With You

Secure & Reliable Web Hosting, Free Domain, Free SSL, 1-Click WordPress Install, Expert 24/7 Support

Semrush - keyword research tool

Boost your online presence with premium web hosting and servers

Disclosure: My content contains affiliate links.

39,961 questions

51,903 answers

573 users

What are the PI related constants in PHP

1 Answer

0 votes
echo "M_PI_2 (pi/2) = " . M_PI_2 . "<br />";
echo "M_PI_4 (pi/4) = " . M_PI_4 . "<br />";
echo "M_1_PI (1/pi) = " . M_1_PI . "<br />";
echo "M_2_PI (2/pi) = " . M_1_PI . "<br />";
echo "M_SQRTPI (sqrt(pi)) = " . M_SQRTPI . "<br />";
echo "M_2_SQRTPI (2/sqrt(pi)) = " . M_2_SQRTPI . "<br />";


/*
run: 

M_PI_2 (pi/2) = 1.5707963267949
M_PI_4 (pi/4) = 0.78539816339745
M_1_PI (1/pi) = 0.31830988618379
M_2_PI (2/pi) = 0.31830988618379
M_SQRTPI (sqrt(pi)) = 1.7724538509055
M_2_SQRTPI (2/sqrt(pi)) = 1.1283791670955

*/

 



answered Jun 5, 2016 by avibootz

Related questions

1 answer 178 views
1 answer 154 views
154 views asked Oct 16, 2017 by avibootz
1 answer 171 views
171 views asked Dec 16, 2016 by avibootz
1 answer 180 views
2 answers 195 views
...