From bdea4b4b67fc67b4231965f20a49170273263e08 Mon Sep 17 00:00:00 2001 From: Brian Wignall Date: Mon, 9 Dec 2019 10:06:17 -0500 Subject: [PATCH] Fix typos --- base/reducedim.jl | 2 +- base/special/cbrt.jl | 2 +- base/stream.jl | 4 ++-- contrib/mac/frameworkapp/ExecSandbox/ExecSandboxProtocol.h | 2 +- contrib/windows/build-installer.iss | 2 +- doc/src/devdocs/types.md | 2 +- stdlib/REPL/test/repl.jl | 2 +- 7 files changed, 8 insertions(+), 8 deletions(-) diff --git a/base/reducedim.jl b/base/reducedim.jl index 996729be8bc4c..a448931499fc5 100644 --- a/base/reducedim.jl +++ b/base/reducedim.jl @@ -144,7 +144,7 @@ for (f1, f2, initval) in ((:min, :max, :Inf), (:max, :min, :(-Inf))) # otherwise use the min/max of the first slice as initial value v0 = mapreduce(f, $f2, A1) - # but NaNs need to be avoided as intial values + # but NaNs need to be avoided as initial values v0 = v0 != v0 ? typeof(v0)($initval) : v0 T = _realtype(f, promote_union(eltype(A))) diff --git a/base/special/cbrt.jl b/base/special/cbrt.jl index e902cf0bde7c3..23b518a87a9a7 100644 --- a/base/special/cbrt.jl +++ b/base/special/cbrt.jl @@ -52,7 +52,7 @@ Adding a bias of -0.03306235651 to the `(e%3+m)รท3` term reduces the error to ab 32. With the IEEE floating point representation, for finite positive normal values, ordinary -integer divison of the value in bits magically gives almost exactly the RHS of the above +integer division of the value in bits magically gives almost exactly the RHS of the above provided we first subtract the exponent bias and later add it back. We do the subtraction virtually to keep e >= 0 so that ordinary integer division rounds towards minus infinity; this is also efficient. All operations can be done in 32-bit. diff --git a/base/stream.jl b/base/stream.jl index 933db06f67fee..7932f4fe69628 100644 --- a/base/stream.jl +++ b/base/stream.jl @@ -51,7 +51,7 @@ function eof(s::LibuvStream) # and that we won't return true if there's a readerror pending (it'll instead get thrown). # This requires some careful ordering here (TODO: atomic loads) bytesavailable(s) > 0 && return false - open = isopen(s) # must preceed readerror check + open = isopen(s) # must precede readerror check s.readerror === nothing || throw(s.readerror) return !open end @@ -332,7 +332,7 @@ end function wait_readnb(x::LibuvStream, nb::Int) # fast path before iolock acquire bytesavailable(x.buffer) >= nb && return - open = isopen(x) # must preceed readerror check + open = isopen(x) # must precede readerror check x.readerror === nothing || throw(x.readerror) open || return iolock_begin() diff --git a/contrib/mac/frameworkapp/ExecSandbox/ExecSandboxProtocol.h b/contrib/mac/frameworkapp/ExecSandbox/ExecSandboxProtocol.h index 5dd16e74f74c0..42ef1465b9163 100644 --- a/contrib/mac/frameworkapp/ExecSandbox/ExecSandboxProtocol.h +++ b/contrib/mac/frameworkapp/ExecSandbox/ExecSandboxProtocol.h @@ -17,7 +17,7 @@ @param executableBookmark NSURL file bookmark for the julia executable to run. @param args Arguments to pass to julia. @param reply Async result with task and standard in, out, and error. An error - occured if task is nil. + occurred if task is nil. */ - (void)eval:(NSString *_Nonnull)juliaProgram withJulia:(NSData *_Nonnull)executableBookmark diff --git a/contrib/windows/build-installer.iss b/contrib/windows/build-installer.iss index 7e2ee7e75a840..9ec9a97912608 100644 --- a/contrib/windows/build-installer.iss +++ b/contrib/windows/build-installer.iss @@ -28,7 +28,7 @@ PreparingDesc= InstallingLabel= ClickFinish= FinishedHeadingLabel=Installation complete -FinishedLabelNoIcons=[name] has been succesfully installed. +FinishedLabelNoIcons=[name] has been successfully installed. FinishedLabel= StatusExtractFiles=Extracting... StatusUninstalling=Removing... diff --git a/doc/src/devdocs/types.md b/doc/src/devdocs/types.md index e85505e590906..d18ddad7e7f00 100644 --- a/doc/src/devdocs/types.md +++ b/doc/src/devdocs/types.md @@ -82,7 +82,7 @@ f3(A::Array{T}) where {T<:Any} = 3 f4(A::Array{Any}) = 4 ``` -The signature - as decribed in [Function calls](@ref) - of `f3` is a `UnionAll` type wrapping a tuple type: `Tuple{typeof(f3), Array{T}} where T`. +The signature - as described in [Function calls](@ref) - of `f3` is a `UnionAll` type wrapping a tuple type: `Tuple{typeof(f3), Array{T}} where T`. All but `f4` can be called with `a = [1,2]`; all but `f2` can be called with `b = Any[1,2]`. Let's look at these types a little more closely: diff --git a/stdlib/REPL/test/repl.jl b/stdlib/REPL/test/repl.jl index 37b775779b3ba..b4c08dc821317 100644 --- a/stdlib/REPL/test/repl.jl +++ b/stdlib/REPL/test/repl.jl @@ -1086,7 +1086,7 @@ fake_repl() do stdin_write, stdout_read, repl # for the "region_active" to have time to be updated @test LineEdit.state(repl.mistate).region_active == :off - @test s4 == "anything" # no control characters between the last two occurences of "anything" + @test s4 == "anything" # no control characters between the last two occurrences of "anything" write(stdin_write, "\x15\x04") Base.wait(repltask) end