update page now
Longhorn PHP 2026 - Call For Papers

Voting

: five minus five?
(Example: nine)

The Note You're Voting On

biziclop
3 years ago
You can use array_product() to calculate the geometric mean of an array of numbers:  

<?php
$a = [ 1, 10, 100 ];
$geom_avg = pow( array_product( $a ), 1 / count( $a ));
// = 9.999999999999998 ≈ 10
?>

<< Back to user notes page

To Top