Geometric mean of all values in the array If the array is empty, it returns 1 (1 is identity element for multiplication)

import { geometricMean } from '@kitsuyui/mymath'
geometricMean([1, 2, 3, 4]) // => 2.213363839400643
  • Parameters

    • values: number[]

    Returns number