diff --git a/blas/gonum/cmplx.go b/blas/gonum/cmplx.go index 4c6f57f7..4dae93b2 100644 --- a/blas/gonum/cmplx.go +++ b/blas/gonum/cmplx.go @@ -11,7 +11,7 @@ var ( _ blas.Complex128 = Implementation{} ) -// TOOD(btracey): Replace this as complex routines are added, and instead +// TODO(btracey): Replace this as complex routines are added, and instead // automatically generate the complex64 routines from the complex128 ones. var noComplex = "native: implementation does not implement this routine, see the cgo wrapper in gonum.org/v1/netlib/blas" diff --git a/blas/gonum/dgemm.go b/blas/gonum/dgemm.go index a3549844..8e0a4489 100644 --- a/blas/gonum/dgemm.go +++ b/blas/gonum/dgemm.go @@ -121,7 +121,7 @@ func dgemmParallel(aTrans, bTrans bool, m, n, k int, a []float64, lda int, b []f go func() { defer wg.Done() // Make local copies of otherwise global variables to reduce shared memory. - // This has a noticable effect on benchmarks in some cases. + // This has a noticeable effect on benchmarks in some cases. alpha := alpha aTrans := aTrans bTrans := bTrans diff --git a/blas/gonum/gonum.go b/blas/gonum/gonum.go index 068e405d..c6bb0021 100644 --- a/blas/gonum/gonum.go +++ b/blas/gonum/gonum.go @@ -62,7 +62,7 @@ func min(a, b int) int { return a } -// blocks returns the number of divisons of the dimension length with the given +// blocks returns the number of divisions of the dimension length with the given // block size. func blocks(dim, bsize int) int { return (dim + bsize - 1) / bsize diff --git a/floats/floats_test.go b/floats/floats_test.go index d5a2f8db..4bd35930 100644 --- a/floats/floats_test.go +++ b/floats/floats_test.go @@ -186,7 +186,7 @@ func TestCumProd(t *testing.T) { emptyReceiver := make([]float64, 0) truth = []float64{} CumProd(emptyReceiver, emptyReceiver) - AreSlicesEqual(t, truth, emptyReceiver, "Wrong cumprod returned with emtpy receiver") + AreSlicesEqual(t, truth, emptyReceiver, "Wrong cumprod returned with empty receiver") } @@ -209,7 +209,7 @@ func TestCumSum(t *testing.T) { emptyReceiver := make([]float64, 0) truth = []float64{} CumSum(emptyReceiver, emptyReceiver) - AreSlicesEqual(t, truth, emptyReceiver, "Wrong cumsum returned with emtpy receiver") + AreSlicesEqual(t, truth, emptyReceiver, "Wrong cumsum returned with empty receiver") } diff --git a/graph/community/louvain_directed.go b/graph/community/louvain_directed.go index 1050dee5..e82390d9 100644 --- a/graph/community/louvain_directed.go +++ b/graph/community/louvain_directed.go @@ -553,7 +553,7 @@ func (l *directedLocalMover) deltaQ(n graph.Node) (deltaQ float64, dst int, src m := l.m gamma := l.resolution - // Find communites connected to n. + // Find communities connected to n. connected := make(set.Ints) // The following for loop is equivalent to: // diff --git a/graph/community/louvain_undirected.go b/graph/community/louvain_undirected.go index a7cbe295..5139927d 100644 --- a/graph/community/louvain_undirected.go +++ b/graph/community/louvain_undirected.go @@ -500,7 +500,7 @@ func (l *undirectedLocalMover) deltaQ(n graph.Node) (deltaQ float64, dst int, sr m2 := l.m2 gamma := l.resolution - // Find communites connected to n. + // Find communities connected to n. connected := make(set.Ints) // The following for loop is equivalent to: // diff --git a/graph/graphs/gen/duplication.go b/graph/graphs/gen/duplication.go index 261d3321..9868cdd4 100644 --- a/graph/graphs/gen/duplication.go +++ b/graph/graphs/gen/duplication.go @@ -73,7 +73,7 @@ func Duplication(dst UndirectedMutator, n int, delta, alpha, sigma float64, src // Loop until we have connectivity // into the rest of the graph. for { - // Add edges to parent's neigbours. + // Add edges to parent's neighbours. to := dst.From(u) sort.Sort(ordered.ByID(to)) for _, v := range to { diff --git a/graph/path/a_star_test.go b/graph/path/a_star_test.go index 085bbb17..315dc8a8 100644 --- a/graph/path/a_star_test.go +++ b/graph/path/a_star_test.go @@ -72,7 +72,7 @@ var aStarTests = []struct { g: func() graph.Graph { tg := internal.NewGrid(10, 10, true) - // Create a partial "wall" accross the middle + // Create a partial "wall" across the middle // row with a gap at the left-hand end. tg.Set(4, 1, false) tg.Set(4, 2, false) @@ -94,7 +94,7 @@ var aStarTests = []struct { g: func() graph.Graph { tg := internal.NewGrid(10, 10, true) - // Create a partial "wall" accross the middle + // Create a partial "wall" across the middle // row with a gap at the left-hand end. tg.Set(4, 1, false) tg.Set(4, 2, false) diff --git a/graph/topo/topo_test.go b/graph/topo/topo_test.go index f4707ce7..11e123b7 100644 --- a/graph/topo/topo_test.go +++ b/graph/topo/topo_test.go @@ -85,7 +85,7 @@ func TestPathExistsInUndirected(t *testing.T) { got := PathExistsIn(g, simple.Node(test.from), simple.Node(test.to)) if got != test.want { - t.Errorf("unexpected result for path existance in test %d: got:%t want %t", i, got, test.want) + t.Errorf("unexpected result for path existence in test %d: got:%t want %t", i, got, test.want) } } } @@ -124,7 +124,7 @@ func TestPathExistsInDirected(t *testing.T) { got := PathExistsIn(g, simple.Node(test.from), simple.Node(test.to)) if got != test.want { - t.Errorf("unexpected result for path existance in test %d: got:%t want %t", i, got, test.want) + t.Errorf("unexpected result for path existence in test %d: got:%t want %t", i, got, test.want) } } } diff --git a/lapack/testlapack/general.go b/lapack/testlapack/general.go index cf1a2a70..69f47c00 100644 --- a/lapack/testlapack/general.go +++ b/lapack/testlapack/general.go @@ -583,7 +583,7 @@ func constructQK(kind string, m, n, k int, a []float64, lda int, tau []float64) } blas64.Ger(-tau[i], vVec, vVec, h) copy(qCopy.Data, q.Data) - // Mulitply q by the new h + // Multiply q by the new h. switch kind { case "QR", "RQ": blas64.Gemm(blas.NoTrans, blas.NoTrans, 1, qCopy, h, 0, q) @@ -608,7 +608,7 @@ func checkBidiagonal(t *testing.T, m, n, nb int, a []float64, lda int, d, e, tau qMat := constructQPBidiagonal(lapack.ApplyQ, m, n, nb, a, lda, tauQ) pMat := constructQPBidiagonal(lapack.ApplyP, m, n, nb, a, lda, tauP) - // Compute Q^T * A * P + // Compute Q^T * A * P. aMat := blas64.General{ Rows: m, Cols: n, diff --git a/mat/cholesky.go b/mat/cholesky.go index 6228e160..7ec300af 100644 --- a/mat/cholesky.go +++ b/mat/cholesky.go @@ -287,7 +287,7 @@ func (s *SymDense) InverseCholesky(chol *Cholesky) error { } // SymRankOne performs a rank-1 update of the original matrix A and refactorizes -// its Cholesky factorization, storing the result into the reciever. That is, if +// its Cholesky factorization, storing the result into the receiver. That is, if // in the original Cholesky factorization // U^T * U = A, // in the updated factorization diff --git a/mathext/gamma_inc_inv.go b/mathext/gamma_inc_inv.go index c17fce34..650717b0 100644 --- a/mathext/gamma_inc_inv.go +++ b/mathext/gamma_inc_inv.go @@ -46,7 +46,7 @@ func gammaIncInv(a, y float64) float64 { // Also, after we generate a small interval by bisection above, false // position will do a large step from an interval of width ~1e-4 to ~1e-14 - // in one step (a=10, x=0.05, but similiar for other values). + // in one step (a=10, x=0.05, but similar for other values). result, bestX, _, errEst := falsePosition(lo, hi, flo, fhi, 2*machEp, 2*machEp, 1e-2*a, gammaInc, params) if result == fSolveMaxIterations && errEst > allowedATol+allowedRTol*math.Abs(bestX) { bestX = math.NaN() diff --git a/mathext/internal/amos/amos.go b/mathext/internal/amos/amos.go index b8d0f063..a3fb5b55 100644 --- a/mathext/internal/amos/amos.go +++ b/mathext/internal/amos/amos.go @@ -235,7 +235,7 @@ func Zairy(ZR, ZI float64, ID, KODE int) (AIR, AII float64, NZ int) { } AA = AZ * AZ if AA < TOL/AZ { - goto Fourty + goto Forty } TRM1R = CONER TRM1I = CONEI @@ -272,12 +272,12 @@ func Zairy(ZR, ZI float64, ID, KODE int) (AIR, AII float64, NZ int) { D2 = D2 + BK AD = math.Min(D1, D2) if ATRM < TOL*AD { - goto Fourty + goto Forty } AK = AK + 18.0E0 BK = BK + 18.0E0 } -Fourty: +Forty: if ID == 1 { goto Fifty } @@ -539,7 +539,7 @@ func Zbknu(ZR, ZI, FNU float64, KODE, N int, YR, YI []float64, NZ int, TOL, ELIM * CYI(2) */ - // TOOD(btracey): Find which of these are inputs/outputs/both and clean up + // TODO(btracey): Find which of these are inputs/outputs/both and clean up // the function call. // YR and YI have length n (but n+1 with better indexing) var AA, AK, ASCLE, A1, A2, BB, BK, CAZ, @@ -641,7 +641,7 @@ Ten: T2 = math.Exp(-dgamln(A2, IDUM)) T1 = 1.0E0 / (T2 * FC) if math.Abs(DNU) > 0.1E0 { - goto Fourty + goto Forty } // SERIES FOR F0 TO RESOLVE INDETERMINACY FOR SMALL ABS(DNU). @@ -658,7 +658,7 @@ Ten: Thirty: G1 = -S goto Fifty -Fourty: +Forty: G1 = (T1 - T2) / (DNU + DNU) Fifty: G2 = (T1 + T2) * 0.5E0 @@ -1352,7 +1352,7 @@ Twenty: YI[I] = CSI NZ = NZ - 1 if IC == KK-1 { - goto Fourty + goto Forty } IC = KK continue @@ -1371,7 +1371,7 @@ Twenty: NZ = N - 1 } goto FourtyFive -Fourty: +Forty: NZ = KK - 2 FourtyFive: for I = 1; I <= NZ; I++ { @@ -1452,7 +1452,7 @@ Ten: YR[i] = real(v) YI[i] = imag(v) } - goto Fourty + goto Forty Twenty: if AZ < RL { goto Thirty @@ -1462,14 +1462,14 @@ Twenty: if NW < 0 { goto Eighty } - goto Fourty + goto Forty Thirty: // MILLER ALGORITHM NORMALIZED BY THE SERIES FOR THE I FUNCTION ZNR, ZNI, FNU, KODE, NN, YR, YI, NW, TOL = Zmlri(ZNR, ZNI, FNU, KODE, NN, YR, YI, NW, TOL) if NW < 0 { goto Eighty } -Fourty: +Forty: // ANALYTIC CONTINUATION TO THE LEFT HALF PLANE FOR THE K FUNCTION. ZNR, ZNI, FNU, KODE, _, CYR, CYI, NW, TOL, ELIM, ALIM = Zbknu(ZNR, ZNI, FNU, KODE, 1, CYR, CYI, NW, TOL, ELIM, ALIM) if NW != 0 { @@ -1796,7 +1796,7 @@ Twenty: I = I + 1 K = 0 if INU < IAZ { - goto Fourty + goto Forty } // COMPUTE RELATIVE TRUNCATION ERROR FOR RATIOS. P1R = ZEROR @@ -1825,7 +1825,7 @@ Twenty: continue } if ITIME == 2 { - goto Fourty + goto Forty } ACK = cmplx.Abs(complex(CKR, CKI)) FLAM = ACK + math.Sqrt(ACK*ACK-1.0E0) @@ -1835,7 +1835,7 @@ Twenty: ITIME = 2 } goto OneTen -Fourty: +Forty: // BACKWARD RECURRENCE AND SUM NORMALIZING RELATION. K = K + 1 KK = max(I+IAZ, K+INU) @@ -1957,7 +1957,7 @@ OneTen: // condition |z| <= 2*sqrt(fnu+1) was violated and the computation must be // completed in another routine with n -= abs(nz). func Zseri(z complex128, fnu float64, kode, n int, y []complex128, tol, elim, alim float64) (nz int) { - // TOOD(btracey): The original fortran line is "ARM = 1.0D+3*D1MACH(1)". Evidently, in Fortran + // TODO(btracey): The original fortran line is "ARM = 1.0D+3*D1MACH(1)". Evidently, in Fortran // this is interpreted as one to the power of +3*D1MACH(1). While it is possible // this was intentional, it seems unlikely. arm := 1000 * dmach[1] diff --git a/mathext/internal/amos/origcode_test.go b/mathext/internal/amos/origcode_test.go index d1129917..a7d8be8f 100644 --- a/mathext/internal/amos/origcode_test.go +++ b/mathext/internal/amos/origcode_test.go @@ -226,7 +226,7 @@ func zairyOrig(ZR, ZI float64, ID, KODE int) (AIR, AII float64, NZ int) { } AA = AZ * AZ if AA < TOL/AZ { - goto Fourty + goto Forty } TRM1R = CONER TRM1I = CONEI @@ -263,12 +263,12 @@ func zairyOrig(ZR, ZI float64, ID, KODE int) (AIR, AII float64, NZ int) { D2 = D2 + BK AD = dmin(D1, D2) if ATRM < TOL*AD { - goto Fourty + goto Forty } AK = AK + 18.0E0 BK = BK + 18.0E0 } -Fourty: +Forty: if ID == 1 { goto Fifty } @@ -530,7 +530,7 @@ func zbknuOrig(ZR, ZI, FNU float64, KODE, N int, YR, YI []float64, NZ int, TOL, * CYI(2) */ - // TOOD(btracey): Find which of these are inputs/outputs/both and clean up + // TODO(btracey): Find which of these are inputs/outputs/both and clean up // the function call. // YR and YI have length n (but n+1 with better indexing) var AA, AK, ASCLE, A1, A2, BB, BK, CAZ, @@ -623,7 +623,7 @@ Ten: T2 = dexp(-dgamln(A2, IDUM)) T1 = 1.0E0 / (T2 * FC) if dabs(DNU) > 0.1E0 { - goto Fourty + goto Forty } // SERIES FOR F0 TO RESOLVE INDETERMINACY FOR SMALL ABS(DNU). @@ -640,7 +640,7 @@ Ten: Thirty: G1 = -S goto Fifty -Fourty: +Forty: G1 = (T1 - T2) / (DNU + DNU) Fifty: G2 = (T1 + T2) * 0.5E0 @@ -1325,7 +1325,7 @@ Twenty: YI[I] = CSI NZ = NZ - 1 if IC == KK-1 { - goto Fourty + goto Forty } IC = KK continue @@ -1344,7 +1344,7 @@ Twenty: NZ = N - 1 } goto FourtyFive -Fourty: +Forty: NZ = KK - 2 FourtyFive: for I = 1; I <= NZ; I++ { @@ -1413,7 +1413,7 @@ func zacaiOrig(ZR, ZI, FNU float64, KODE, MR, N int, YR, YI []float64, NZ int, R Ten: // POWER SERIES FOR THE I FUNCTION. ZNR, ZNI, FNU, KODE, NN, YR, YI, NW, TOL, ELIM, ALIM = zseriOrig(ZNR, ZNI, FNU, KODE, NN, YR, YI, NW, TOL, ELIM, ALIM) - goto Fourty + goto Forty Twenty: if AZ < RL { goto Thirty @@ -1423,14 +1423,14 @@ Twenty: if NW < 0 { goto Eighty } - goto Fourty + goto Forty Thirty: // MILLER ALGORITHM NORMALIZED BY THE SERIES FOR THE I FUNCTION ZNR, ZNI, FNU, KODE, NN, YR, YI, NW, TOL = zmlriOrig(ZNR, ZNI, FNU, KODE, NN, YR, YI, NW, TOL) if NW < 0 { goto Eighty } -Fourty: +Forty: // ANALYTIC CONTINUATION TO THE LEFT HALF PLANE FOR THE K FUNCTION. ZNR, ZNI, FNU, KODE, _, CYR, CYI, NW, TOL, ELIM, ALIM = zbknuOrig(ZNR, ZNI, FNU, KODE, 1, CYR, CYI, NW, TOL, ELIM, ALIM) if NW != 0 { @@ -1746,7 +1746,7 @@ Twenty: I = I + 1 K = 0 if INU < IAZ { - goto Fourty + goto Forty } // COMPUTE RELATIVE TRUNCATION ERROR FOR RATIOS. P1R = ZEROR @@ -1775,7 +1775,7 @@ Twenty: continue } if ITIME == 2 { - goto Fourty + goto Forty } ACK = zabs(complex(CKR, CKI)) FLAM = ACK + dsqrt(ACK*ACK-1.0E0) @@ -1785,7 +1785,7 @@ Twenty: ITIME = 2 } goto OneTen -Fourty: +Forty: // BACKWARD RECURRENCE AND SUM NORMALIZING RELATION. K = K + 1 KK = max0(I+IAZ, K+INU) @@ -1964,7 +1964,7 @@ Twenty: AK1R = AK1R - ZR } if AK1R > (-ELIM) { - goto Fourty + goto Forty } Thirty: NZ = NZ + 1 @@ -1978,7 +1978,7 @@ Thirty: return ZR, ZI, FNU, KODE, N, YR, YI, NZ, TOL, ELIM, ALIM } goto Twenty -Fourty: +Forty: if AK1R > (-ALIM) { goto Fifty } diff --git a/mathext/roots.go b/mathext/roots.go index a5cd329d..61ff12c6 100644 --- a/mathext/roots.go +++ b/mathext/roots.go @@ -46,7 +46,7 @@ const ( // errEst: error estimation func falsePosition(x1, x2, f1, f2, absErr, relErr, bisectTil float64, f objectiveFunc, fExtra []float64) (fSolveResult, float64, float64, float64) { // The false position steps are either unmodified, or modified with the - // Anderson-Bjorck method as appropiate. Theoretically, this has a "speed of + // Anderson-Bjorck method as appropriate. Theoretically, this has a "speed of // convergence" of 1.7 (bisection is 1, Newton is 2). // Note that this routine was designed initially to work with gammaincinv, so // it may not be tuned right for other problems. Don't use it blindly. diff --git a/optimize/convex/lp/simplex.go b/optimize/convex/lp/simplex.go index c3299874..d1012070 100644 --- a/optimize/convex/lp/simplex.go +++ b/optimize/convex/lp/simplex.go @@ -141,7 +141,7 @@ func simplex(initialBasic []int, c []float64, A mat.Matrix, b []float64, tol flo basicIdxs = make([]int, len(initialBasic)) copy(basicIdxs, initialBasic) } else { - // No inital basis supplied. Solve the PhaseI problem. + // No initial basis supplied. Solve the PhaseI problem. basicIdxs, ab, xb, err = findInitialBasic(A, b) if err != nil { return math.NaN(), nil, nil, err diff --git a/optimize/global.go b/optimize/global.go index 4247e331..9f73b753 100644 --- a/optimize/global.go +++ b/optimize/global.go @@ -24,7 +24,7 @@ type GlobalMethod interface { Done() } -// Global uses a global optimizer to search for the gloabl minimum of a +// Global uses a global optimizer to search for the global minimum of a // function. A maximization problem can be transformed into a // minimization problem by multiplying the function by -1. // diff --git a/optimize/interfaces.go b/optimize/interfaces.go index e28ed3a1..12544610 100644 --- a/optimize/interfaces.go +++ b/optimize/interfaces.go @@ -70,7 +70,7 @@ type Statuser interface { // dir_k starting at the most recent location x_k, i.e., it tries to minimize // the function // φ(step) := f(x_k + step * dir_k) where step > 0. -// Typically, a Linesearcher will be used in conjuction with LinesearchMethod +// Typically, a Linesearcher will be used in conjunction with LinesearchMethod // for performing gradient-based optimization through sequential line searches. type Linesearcher interface { // Init initializes the Linesearcher and a new line search. Value and @@ -100,7 +100,7 @@ type Linesearcher interface { // NextDirectioner implements a strategy for computing a new line search // direction at each major iteration. Typically, a NextDirectioner will be -// used in conjuction with LinesearchMethod for performing gradient-based +// used in conjunction with LinesearchMethod for performing gradient-based // optimization through sequential line searches. type NextDirectioner interface { // InitDirection initializes the NextDirectioner at the given starting location, diff --git a/optimize/types.go b/optimize/types.go index f6ecfc52..461693ff 100644 --- a/optimize/types.go +++ b/optimize/types.go @@ -184,7 +184,7 @@ type Settings struct { // // If f < f_best and // f_best - f > FunctionConverge.Relative * maxabs(f, f_best) + FunctionConverge.Absolute - // then a significant decrease has occured, and f_best is updated. + // then a significant decrease has occurred, and f_best is updated. // // If there is no significant decrease for FunctionConverge.Iterations // major iterations, FunctionConvergence status is returned. diff --git a/stat/distuv/categorical.go b/stat/distuv/categorical.go index 165a0565..d2053e93 100644 --- a/stat/distuv/categorical.go +++ b/stat/distuv/categorical.go @@ -9,7 +9,7 @@ import ( "math/rand" ) -// Categorical is an extension of the Bernouilli distribution where x takes +// Categorical is an extension of the Bernoulli distribution where x takes // values {0, 1, ..., len(w)-1} where w is the weight vector. Categorical must // be initialized with NewCategorical. type Categorical struct { diff --git a/stat/samplemv/metropolishastings.go b/stat/samplemv/metropolishastings.go index 29d6ad4e..d4d210e8 100644 --- a/stat/samplemv/metropolishastings.go +++ b/stat/samplemv/metropolishastings.go @@ -23,7 +23,7 @@ type MHProposal interface { ConditionalLogProb(x, y []float64) (prob float64) // ConditionalRand generates a new random location conditioned being at the - // location y. If the first arguement is nil, a new slice is allocated and + // location y. If the first argument is nil, a new slice is allocated and // returned. Otherwise, the random location is stored in-place into the first // argument, and ConditionalRand will panic if the input slice lengths differ. ConditionalRand(x, y []float64) []float64 @@ -114,7 +114,7 @@ func (m MetropolisHastingser) Sample(batch *mat.Dense) { // MetropolisHastings generates rows(batch) samples using the Metropolis Hastings // algorithm (http://en.wikipedia.org/wiki/Metropolis%E2%80%93Hastings_algorithm), -// with the given target and proposal distributions, starting at the intial location +// with the given target and proposal distributions, starting at the initial location // and storing the results in-place into samples. If src != nil, it will be used to generate random // numbers, otherwise rand.Float64 will be used. // @@ -204,7 +204,7 @@ func (p *ProposalNormal) ConditionalLogProb(x, y []float64) (prob float64) { } // ConditionalRand generates a new random location conditioned being at the -// location y. If the first arguement is nil, a new slice is allocated and +// location y. If the first argument is nil, a new slice is allocated and // returned. Otherwise, the random location is stored in-place into the first // argument, and ConditionalRand will panic if the input slice lengths differ or // if they are not equal to the dimension of the covariance matrix. diff --git a/stat/sampleuv/sample.go b/stat/sampleuv/sample.go index 5e870d3c..d3a6290b 100644 --- a/stat/sampleuv/sample.go +++ b/stat/sampleuv/sample.go @@ -333,7 +333,7 @@ func (m MetropolisHastingser) Sample(batch []float64) { // MetropolisHastings generates len(batch) samples using the Metropolis Hastings // algorithm (http://en.wikipedia.org/wiki/Metropolis%E2%80%93Hastings_algorithm), -// with the given target and proposal distributions, starting at the intial location +// with the given target and proposal distributions, starting at the initial location // and storing the results in-place into samples. If src != nil, it will be used to generate random // numbers, otherwise rand.Float64 will be used. // diff --git a/unit/unittype.go b/unit/unittype.go index d91899b2..6379cf9c 100644 --- a/unit/unittype.go +++ b/unit/unittype.go @@ -138,7 +138,7 @@ var ( // Dimensions represent the dimensionality of the unit in powers // of that dimension. If a key is not present, the power of that -// dimension is zero. Dimensions is used in conjuction with New. +// dimension is zero. Dimensions is used in conjunction with New. type Dimensions map[Dimension]int func (d Dimensions) String() string { @@ -253,7 +253,7 @@ func DimensionsMatch(a, b Uniter) bool { return true } -// Add adds the function argument to the reciever. Panics if the units of +// Add adds the function argument to the receiver. Panics if the units of // the receiver and the argument don't match. func (u *Unit) Add(uniter Uniter) *Unit { a := uniter.Unit()