Skip to content

Commit 1d4f91b

Browse files
giordanosostock
andauthored
Apply suggestions from code review
Co-authored-by: Sebastian Stock <[email protected]>
1 parent 09d7ca0 commit 1d4f91b

File tree

1 file changed

+9
-9
lines changed

1 file changed

+9
-9
lines changed

docs/src/logarithm.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -164,17 +164,17 @@ Finally, for completeness we note that both `Level` and `Gain` are subtypes of `
164164
Unitful.LogScaled
165165
```
166166

167-
## Addition and Multiplication rules
167+
## Addition and multiplication rules
168168

169-
For dimensionaless logarithmic units, addition behaves as one might expect:
169+
For dimensionless logarithmic quantities, addition behaves as one might expect:
170170

171171
```jldoctest
172172
julia> 10u"dB" + 10u"dB"
173173
20 dB
174174
```
175175

176-
I.e. the gains add. However, as hinted at above, dimensionful logarithmic units,
177-
behave as their corresponding linear unit:
176+
I.e. the gains add. However, as hinted at above, dimensionful logarithmic quantities
177+
behave as their corresponding linear quantity:
178178

179179
```
180180
julia> 10u"dBm" + 10u"dBm"
@@ -246,10 +246,10 @@ julia> 0u"dB/Hz"
246246
[0 dB] Hz^-1
247247
```
248248

249-
Since dimensionful logarithmic units still behave as their corresponding linear unit,
250-
working with dimensionful units is entirely consistnet.
249+
Since dimensionful logarithmic quantities still behave as their corresponding linear quantities,
250+
working with dimensionful units is entirely consistent.
251251

252-
The behavior of addition and multiplication are summarized in the following table, with entries marked by
252+
The behavior of addition and multiplication is summarized in the following tables, with entries marked by
253253
† indicate prohibited operations. This table is populated automatically whenever the docs
254254
are built.
255255

@@ -330,10 +330,10 @@ julia> 10u"dBm" + (10u"dBm" + 20u"dB")
330330
julia> 10u"dBm" * 20u"dB"
331331
ERROR: ArgumentError: Multiplying a level by a Gain is disallowed. Use addition, or `linear` depending on context.
332332
333-
julia> linear(10u"dBm") * 20u"dB"
333+
julia> 10u"mW" * 20u"dB"
334334
1000.0 mW
335335
336-
julia> linear(10u"dBm") + 20u"dB"
336+
julia> 10u"mW" + 20u"dB"
337337
ERROR: ArgumentError: Adding a gain to a linear quantity is disallowed. Use multiplication or convert to `Level` first
338338
```
339339

0 commit comments

Comments
 (0)