module Music.Theory.Math.Nichomachus where
arithmetic_mean :: Fractional a => a -> a -> a
arithmetic_mean :: forall a. Fractional a => a -> a -> a
arithmetic_mean a
a a
c = (a
a forall a. Num a => a -> a -> a
+ a
c) forall a. Fractional a => a -> a -> a
/ a
2
geometric_mean :: Floating a => a -> a -> a
geometric_mean :: forall a. Floating a => a -> a -> a
geometric_mean a
a a
c = forall a. Floating a => a -> a
sqrt (a
a forall a. Num a => a -> a -> a
* a
c)
harmonic_mean :: Fractional a => a -> a -> a
harmonic_mean :: forall a. Fractional a => a -> a -> a
harmonic_mean a
a a
c = (a
2 forall a. Num a => a -> a -> a
* a
a forall a. Num a => a -> a -> a
* a
c) forall a. Fractional a => a -> a -> a
/ (a
a forall a. Num a => a -> a -> a
+ a
c)
cont_harmonic_mean :: Fractional a => a -> a -> a
cont_harmonic_mean :: forall a. Fractional a => a -> a -> a
cont_harmonic_mean a
a a
c = (a
a forall a. Num a => a -> a -> a
* a
a forall a. Num a => a -> a -> a
+ a
c forall a. Num a => a -> a -> a
* a
c) forall a. Fractional a => a -> a -> a
/ (a
a forall a. Num a => a -> a -> a
+ a
c)
cont_geometric_mean :: Floating a => a -> a -> a
cont_geometric_mean :: forall a. Floating a => a -> a -> a
cont_geometric_mean a
a a
c = (a
c forall a. Num a => a -> a -> a
- a
a forall a. Num a => a -> a -> a
+ forall a. Floating a => a -> a
sqrt (a
5 forall a. Num a => a -> a -> a
* a
a forall a. Num a => a -> a -> a
* a
a forall a. Num a => a -> a -> a
- a
2 forall a. Num a => a -> a -> a
* a
a forall a. Num a => a -> a -> a
* a
c forall a. Num a => a -> a -> a
+ a
c forall a. Num a => a -> a -> a
* a
c)) forall a. Fractional a => a -> a -> a
/ a
2
subcont_geometric_mean :: Floating a => a -> a -> a
subcont_geometric_mean :: forall a. Floating a => a -> a -> a
subcont_geometric_mean a
a a
c = (a
a forall a. Num a => a -> a -> a
- a
c forall a. Num a => a -> a -> a
+ forall a. Floating a => a -> a
sqrt (a
a forall a. Num a => a -> a -> a
* a
a forall a. Num a => a -> a -> a
- a
2 forall a. Num a => a -> a -> a
* a
a forall a. Num a => a -> a -> a
* a
c forall a. Num a => a -> a -> a
+ a
5 forall a. Num a => a -> a -> a
* a
c forall a. Num a => a -> a -> a
* a
c)) forall a. Fractional a => a -> a -> a
/ a
2