Skip to content

Commit

Permalink
go doc
Browse files Browse the repository at this point in the history
  • Loading branch information
thc committed Nov 21, 2023
1 parent 8f3a35d commit d062217
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions calcs.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import (
// Dans la fonction qui suit, R[0]==Mediane, R[1]=Q1 et R[2]=Q3
//
// https://fastercapital.com/fr/contenu/Valeurs-aberrantes-dans-les-quartiles---identification-des-valeurs-extremes-dans-l-ensemble-de-donnees.html#Introduction-aux-valeurs-aberrantes-et-aux-quartiles

// quartileCalcf32 return quartiles Q1-3 from []float32 array
func quartileCalcf32(data []float32) [3]float32 { // Return Q1 Q2 Q3
var Q [3]float32
var n float64
Expand Down Expand Up @@ -57,6 +59,7 @@ func quartileCalcf32(data []float32) [3]float32 { // Return Q1 Q2 Q3
return Q
}

// isDecimal function test if float is decimal
func isDecimal(n float64) bool {
return math.Floor(n) == n
}
Expand Down Expand Up @@ -93,6 +96,7 @@ func isDecimal(n float64) bool {
*/

// ZScoreCalF32 calculate median and ecart type from []entries > mini value
func ZScoreCalF32(data []entries, mini float64) (float32, float32) {
//
// ZScore => Calculer la moyenne, l'ecart type
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module projects/quartile
module github.com/thc2cat/quartile

go 1.21

Expand Down

0 comments on commit d062217

Please sign in to comment.