Skip to content

Commit e311bfb

Browse files
committed
transitioned to FieldAlgebra
1 parent e2b87e3 commit e311bfb

File tree

6 files changed

+122
-76
lines changed

6 files changed

+122
-76
lines changed

.appveyor.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ environment:
22
matrix:
33
- julia_version: 1
44
- julia_version: 1.6
5-
- julia_version: 1.7
5+
- julia_version: 1.8
66
- julia_version: nightly
77

88
platform:

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ os:
77
julia:
88
- 1.0
99
- 1.6
10-
- 1.7
10+
- 1.8
1111
- nightly
1212
matrix:
1313
allow_failures:

Project.toml

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,21 @@
11
name = "MeasureSystems"
22
uuid = "ea45d09e-59d0-491b-a101-09823c6a9fd4"
33
authors = ["Michael Reed"]
4-
version = "0.1.5"
4+
version = "0.1.6"
55

66
[deps]
77
Similitude = "d70e672a-ff44-4dfc-8031-4cc812d84922"
88
UnitSystems = "3a241a3c-2137-41aa-af5e-1388e404ca09"
99
Measurements = "eff96d63-e80a-5855-80a2-b1b0885c5ab7"
10-
10+
FieldAlgebra = "0b62d163-fd1d-4060-a953-4385d03545e2"
11+
FieldConstants = "73d362c4-b7ec-495f-a538-f22f12d4d8ae"
1112

1213
[compat]
14+
FieldConstants = "0.1"
15+
FieldAlgebra = "0.1"
1316
Measurements = "2"
14-
UnitSystems = "0.3.4"
15-
Similitude = "0.2"
17+
UnitSystems = "0.3.8"
18+
Similitude = "0.2.6"
1619
julia = "1"
1720

1821
[extras]

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ additional constants `molarmass`, `luminousefficacy`, `gravity`, `angle`, `turn`
4646

4747
Physics constant documentation is at https://geophysics.crucialflow.com/dev/constants
4848

49-
Standardized unit/derived quantities are `hyperfine`, `loschmidt`, `wienwavelength`, `wienfrequency`, `mechanicalheat`, `eddington`, `solarmass`, `jupitermass`, `earthmass`, `lunarmass`, `earthradius`, `greatcircle`, `radarmile`, `hubble`, `cosmological`, `radian`, `steradian`, `degree`, `squaredegree`, `gradian`, `arcminute`, `arcsecond`, `second`, `minute`, `hour`, `day`, `gaussianmonth`, `siderealmonth`, `synodicmonth`, `year`, `gaussianyear`, `siderealyear`, `jovianyear`, `angstrom`, `inch`, `foot`, `surveyfoot`, `yard`, `meter`, `earthmeter`, `mile`, `statutemile`, `meridianmile`, `admiraltymile`, `nauticalmile`, `lunardistance`, `astronomicalunit`, `jupiterdistance`, `lightyear`, `parsec`, `bubnoff`, `ips`, `fps`, `fpm`, `ms`, `kmh`, `mph`, `knot`, `mps`, `barn`, `hectare`, `acre`, `surveyacre`, `liter`, `gallon`, `quart`, `pint`, `cup`, `fluidounce`, `teaspoon`, `tablespoon`, `grain`, `gram`, `earthgram`, `kilogram`, `tonne`, `ton`, `pound`, `ounce`, `slug`, `slinch`, `hyl`, `dyne`, `newton`, `poundal`, `poundforce`, `kilopond`, `psi`, `pascal`, `bar`, `barye`, `technicalatmosphere`, `atmosphere`, `inchmercury`, `torr`, `electronvolt`, `erg`, `joule`, `footpound`, `calorie`, `kilocalorie`, `meancalorie`, `earthcalorie`, `thermalunit`, `gasgallon`, `tontnt`, `watt`, `horsepower`, `horsepowerwatt`, `horsepowermetric`, `electricalhorsepower`, `tonsrefrigeration`, `boilerhorsepower`, `coulomb`, `earthcoulomb`, `ampere`, `volt`, `henry`, `ohm`, `siemens`, `farad`, `weber`, `tesla`, `abcoulomb`, `abampere`, `abvolt`, `abhenry`, `abohm`, `abmho`, `abfarad`, `maxwell`, `gauss`, `oersted`, `gilbert`, `statcoulomb`, `statampere`, `statvolt`, `stathenry`, `statohm`, `statmho`, `statfarad`, `statweber`, `stattesla`, `kelvin`, `rankine`, `celsius`, `fahrenheit`, `sealevel`, `boiling`, `mole`, `earthmole`, `poundmole`, `slugmole`, `slinchmole`, `katal`, `amagat`, `lumen`, `candela`, `lux`, `phot`, `footcandle`, `nit`, `apostilb`, `stilb`, `lambert`, `footlambert`, `bril`, `neper`, `bel`, `decibel`, `hertz`, `apm`, `rpm`, `kayser`, `diopter`, `gforce`, `galileo`, `eotvos`, `darcy`, `poise`, `reyn`, `stokes`, `rayl`, `mpge`, `langley`, `jansky`, `solarflux`, `curie`, `sievert`, `roentgen`, `rem`.
49+
Standardized unit/derived quantities are `hyperfine`, `loschmidt`, `wienwavelength`, `wienfrequency`, `mechanicalheat`, `eddington`, `solarmass`, `jupitermass`, `earthmass`, `lunarmass`, `earthradius`, `greatcircle`, `radarmile`, `hubble`, `cosmological`, `radian`, `steradian`, `degree`, `squaredegree`, `gradian`, `arcminute`, `arcsecond`, `second`, `minute`, `hour`, `day`, `gaussianmonth`, `siderealmonth`, `synodicmonth`, `year`, `gaussianyear`, `siderealyear`, `jovianyear`, `angstrom`, `inch`, `foot`, `surveyfoot`, `yard`, `meter`, `earthmeter`, `mile`, `statutemile`, `meridianmile`, `admiraltymile`, `nauticalmile`, `lunardistance`, `astronomicalunit`, `jupiterdistance`, `lightyear`, `parsec`, `bubnoff`, `ips`, `fps`, `fpm`, `ms`, `kmh`, `mph`, `knot`, `mps`, `barn`, `hectare`, `acre`, `surveyacre`, `liter`, `gallon`, `quart`, `pint`, `cup`, `fluidounce`, `teaspoon`, `tablespoon`, `grain`, `gram`, `earthgram`, `kilogram`, `tonne`, `ton`, `pound`, `ounce`, `slug`, `slinch`, `hyl`, `dyne`, `newton`, `poundal`, `poundforce`, `kilopond`, `psi`, `pascal`, `bar`, `barye`, `technicalatmosphere`, `atmosphere`, `inchmercury`, `torr`, `electronvolt`, `erg`, `joule`, `footpound`, `calorie`, `kilocalorie`, `meancalorie`, `earthcalorie`, `thermalunit`, `gasgallon`, `tontnt`, `watt`, `horsepower`, `horsepowerwatt`, `horsepowermetric`, `electricalhorsepower`, `tonsrefrigeration`, `boilerhorsepower`, `coulomb`, `earthcoulomb`, `ampere`, `volt`, `henry`, `ohm`, `siemens`, `farad`, `weber`, `tesla`, `abcoulomb`, `abampere`, `abvolt`, `abhenry`, `abohm`, `abmho`, `abfarad`, `maxwell`, `gauss`, `oersted`, `gilbert`, `statcoulomb`, `statampere`, `statvolt`, `stathenry`, `statohm`, `statmho`, `statfarad`, `statweber`, `stattesla`, `kelvin`, `rankine`, `celsius`, `fahrenheit`, `sealevel`, `boiling`, `mole`, `earthmole`, `poundmole`, `slugmole`, `slinchmole`, `katal`, `amagat`, `lumen`, `candela`, `lux`, `phot`, `footcandle`, `nit`, `apostilb`, `stilb`, `lambert`, `footlambert`, `bril`, `neper`, `bel`, `decibel`, `hertz`, `apm`, `rpm`, `kayser`, `diopter`, `gforce`, `galileo`, `eotvos`, `darcy`, `poise`, `reyn`, `stokes`, `rayl`, `mpge`, `langley`, `jansky`, `solarflux`, `curie`, `gray`, `roentgen`, `rem`.
5050

5151
Standard physics units are at https://geophysics.crucialflow.com/dev/units
5252

src/MeasureSystems.jl

Lines changed: 110 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -13,17 +13,25 @@ module MeasureSystems
1313
# https://github.com/chakravala
1414
# https://crucialflow.com
1515

16+
using FieldConstants, FieldAlgebra
17+
import FieldAlgebra: coef, coefprod, factorize, showgroup, product, makeint, measure
18+
import FieldAlgebra: AbstractModule, AbelianGroup, Group, LogGroup, ExpGroup
19+
import FieldAlgebra: value, isonezero, islog, base, Variables
1620
import Base: @pure, angle
1721
import UnitSystems
1822
import UnitSystems: UnitSystem, Systems, Constants, Physics, Convert, Dimensionless
1923
import UnitSystems: Coupling, measure, unit, universe, cache, Derived, logdb, expdb, dB
20-
export UnitSystems, Measure, measure, cache
24+
export UnitSystems, Measure, measure, cache, Constant
2125
const dir = dirname(pathof(UnitSystems))
2226

27+
macro group(args...)
28+
FieldAlgebra.group(args...)
29+
end
30+
2331
# measure
2432

2533
using Measurements
26-
struct Measure{N} end
34+
struct Measure{N} <: Real end
2735
const measure_cache = Measurement{Float64}[]
2836
@pure measure(::Measure{N}) where N = measure_cache[N]
2937
function cache(M::Measurement{Float64})
@@ -37,6 +45,20 @@ end
3745
Base.show(io::IO,M::Measure{N}) where N = show(io,measure(M))
3846
Base.one(::Measure) = 𝟏
3947
Base.zero(::Measure) = 𝟏-𝟏
48+
FieldConstants.Constant(N::Measurement) = Constant{cache(N)}()
49+
Base.inv(M::Measure) = cache(inv(measure(M)))
50+
Base.sqrt(M::Measure) = cache(inv(measure(M)))
51+
52+
Base.:*(a::Number,b::Measure) = cache(a*measure(b))
53+
Base.:*(a::Measure,b::Number) = cache(measure(a)*b)
54+
Base.:/(a::Number,b::Measure) = cache(a/measure(b))
55+
Base.:/(a::Measure,b::Number) = cache(measure(a)/b)
56+
Base.:+(a::Number,b::Measure) = cache(a+measure(b))
57+
Base.:+(a::Measure,b::Number) = cache(measure(a)-b)
58+
Base.:+(a::Measurement,b::Measure) = cache(a+measure(b))
59+
Base.:+(a::Measure,b::Measurement) = cache(measure(a)-b)
60+
Base.:-(a::Number,b::Measure) = cache(a-measure(b))
61+
Base.:-(a::Measure,b::Number) = cache(measure(a)-b)
4062

4163
# unit systems
4264

@@ -88,80 +110,101 @@ end
88110
if usingSimilitude
89111
export Similitude, 𝟙, Unified
90112
import Similitude
91-
import Similitude: Unified, coefprod, promoteint
113+
import Similitude: Unified, coefprod, promoteint, USQ
92114
import Similitude: Group,AbelianGroup,LogGroup,ExpGroup,Quantity,Dimension,Quantities,𝟙,usq
93-
import Similitude: Values,value,vals,basis,valueat,makeint,showgroup,ratio,isq,dims,dimtext
115+
import Similitude: Values,value,vals,basis,valueat,showgroup,ratio,isq,dims,dimtext
116+
import FieldAlgebra: makeint, product
94117
for D (:F,:M,:L,:T,:Q,,:N,:J,:A,:R,:C)
95118
@eval const $D = Similitude.$D
96119
end
97-
Similitude.makeint(x::MeasureSystems.Measurements.Measurement) = x
98-
@pure function constant(d::Group,C::Coupling=UnitSystems.Universe,dc=d.c); cs =
99-
UnitSystems.kB^makeint(d.v[1])*
100-
UnitSystems.NA^makeint(d.v[2])*
101-
UnitSystems.𝘩^makeint(d.v[3])*
102-
UnitSystems.𝘤^makeint(d.v[4])*
103-
UnitSystems.𝘦^makeint(d.v[5])*
104-
UnitSystems.Kcd^makeint(d.v[6])*
105-
UnitSystems.ΔνCs^makeint(d.v[7])*
106-
UnitSystems.g₀^makeint(d.v[14])*
107-
UnitSystems.aⱼ^makeint(d.v[15])*
108-
UnitSystems.ft^makeint(d.v[17])*
109-
UnitSystems.ftUS^makeint(d.v[18])*
110-
UnitSystems.lb^makeint(d.v[19])*
111-
UnitSystems.T₀^makeint(d.v[20])*
112-
UnitSystems.atm^makeint(d.v[21])*
113-
UnitSystems.inHg^makeint(d.v[22])*
114-
UnitSystems.RK1990^makeint(d.v[23])*
115-
UnitSystems.KJ1990^makeint(d.v[24])*
116-
UnitSystems.Ωᵢₜ^makeint(d.v[28])*
117-
UnitSystems.Vᵢₜ^makeint(d.v[29])*
118-
UnitSystems.kG^makeint(d.v[30])*
119-
Base.MathConstants.φ^makeint(d.v[34])*
120-
Base.MathConstants.γ^makeint(d.v[35])*
121-
Base.MathConstants.^makeint(d.v[36])*
122-
(2π)^makeint(d.v[37]); is =
123-
2.0^makeint(d.v[38])*
124-
3.0^makeint(d.v[39])*
125-
5.0^makeint(d.v[40])*
126-
7.0^makeint(d.v[41])*
127-
11.0^makeint(d.v[42])*
128-
19.0^makeint(d.v[43])*
129-
43.0^makeint(d.v[44]); me =
130-
abs(d.v[8])+abs(d.v[9])+abs(d.v[10])+abs(d.v[11])+abs(d.v[12])+abs(d.v[13])+abs(d.v[16])+abs(d.v[25])+abs(d.v[26])+abs(d.v[27])+abs(d.v[31])+abs(d.v[32])+abs(d.v[33])
131-
if iszero(me); return cs*(is*d.c); else; ms =
132-
measurement("10973731.5681601(210)")^makeint(d.v[8])* #R∞
133-
inv(measurement("137.035999084(21)"))^makeint(d.v[9])* #α
134-
inv(measurement("1822.888486209(53)"))^makeint(d.v[10])* #μₑᵤ
135-
measurement("1.007276466621(53)")^makeint(d.v[11])* #μₑᵤ
136-
measurement("0.6889(56)")^makeint(d.v[12])* #ΩΛ
137-
measurement("67.66(42)")^makeint(d.v[13])* #H0
138-
measurement("149597870700(3)")^makeint(d.v[16])* #au
139-
measurement("25812.8074555(59)")^makeint(d.v[25])* #RK
140-
(measurement("483597.8525(30)")*1e9)^makeint(d.v[26])* #KJ
141-
measurement("8.3144598(48)")^makeint(d.v[27])* #Rᵤ
142-
measurement("0.00000002176434(24)")^makeint(d.v[31])* #mP
143-
(measurement("3.986004418(8)")*1e14)^makeint(d.v[32])* #GME
144-
(measurement("1.26686534(9)")*1e17)^makeint(d.v[33]) #GMJ
145-
return (cs*(is*d.c))*ms; end
120+
FieldAlgebra.makeint(x::MeasureSystems.Measurements.Measurement) = x
121+
FieldAlgebra.promoteint(x::Measure) = x
122+
@group Measures begin
123+
kB = UnitSystems.kB
124+
NA = UnitSystems.NA
125+
𝘩 = UnitSystems.𝘩
126+
𝘤 = UnitSystems.𝘤
127+
𝘦 = UnitSystems.𝘦
128+
Kcd = UnitSystems.Kcd
129+
ΔνCs = UnitSystems.ΔνCs
130+
R∞ measurement("10973731.5681601(210)")
131+
α inv(measurement("137.035999084(21)"))
132+
μₑᵤ inv(measurement("1822.888486209(53)"))
133+
μₚᵤ measurement("1.007276466621(53)")
134+
ΩΛ measurement("0.6889(56)")
135+
H0 measurement("67.66(42)")
136+
g₀ = UnitSystems.g₀
137+
aⱼ = UnitSystems.aⱼ
138+
au measurement("149597870700(3)")
139+
ft = UnitSystems.ft
140+
ftUS = UnitSystems.ftUS
141+
lb = UnitSystems.lb
142+
T₀ = UnitSystems.T₀
143+
atm = UnitSystems.atm
144+
inHg = UnitSystems.inHg
145+
RK90 = UnitSystems.RK1990
146+
KJ90 = UnitSystems.KJ1990
147+
RK measurement("25812.8074555(59)")
148+
KJ measurement("483597.8525(30)")*1e9
149+
Rᵤ2014 measurement("8.3144598(48)")
150+
Ωᵢₜ = UnitSystems.Ωᵢₜ
151+
Vᵢₜ = UnitSystems.Vᵢₜ
152+
kG = UnitSystems.kG
153+
mP measurement("0.00000002176434(24)")
154+
GME measurement("3.986004418(8)")*1e14
155+
GMJ measurement("1.26686534(9)")*1e17
156+
φ = Base.MathConstants.φ
157+
γ = Base.MathConstants.γ
158+
= Base.MathConstants.
159+
τ 2π
160+
2 = 2
161+
3 = 3
162+
5 = 5
163+
7 = 7
164+
11 = 11
165+
19 = 19
166+
43 = 43
146167
end
168+
Base.show(io::IO,x::Group{:Measures}) = showgroup(io,x,basis,'𝟏')
169+
phys(j,k=vals) = Constant(valueat(j,k,:Measures))
147170
const sim = dirname(pathof(Similitude))
148171
include("$sim/constant.jl")
149-
Base.:*(a::Measurements.Measurement,b::Constant{D}) where D = a*constant(D)
150-
Base.:*(a::Constant{D},b::Measurements.Measurement) where D = constant(D)*b
172+
Base.:*(a::Measure,b::Group{G,T,S,N}) where {G,T,S,N} = FieldAlgebra.times(factorize(a,Val(G)),b)
173+
Base.:*(a::Group{G,T,S,N},b::Measure) where {G,T,S,N} = FieldAlgebra.times(a,factorize(b,Val(G)))
174+
Base.:/(a::Measure,b::Group{G,T,S,N}) where {G,T,S,N} = a*inv(b)
175+
Base.:/(a::Group{G,T,S,N},b::Measure) where {G,T,S,N} = a*inv(b)
176+
Base.:+(a::Measure,b::Group{:Measures,T,S,N}) where {T,S,N} = a+FieldAlgebra.product(b)
177+
Base.:+(a::Group{:Measures,T,S,N},b::Measure) where {T,S,N} = FieldAlgebra.product(a)+b
178+
Base.:*(a::Group{:Measures},b::Group{:USQ}) = Group(b.v,a*b.c,Val(:USQ))
179+
Base.:*(a::Group{:USQ},b::Group{:Measures}) = Group(a.v,a.c*b,Val(:USQ))
180+
Base.:/(a::Group{:Measures},b::Group{:USQ}) = a*inv(b)
181+
Base.:/(a::Group{:USQ},b::Group{:Measures}) = a*inv(b)
182+
Base.:+(a::Group{:Measures,T,S,N} where {T,S},b::Group{:Measures,T,S,N} where {T,S}) where N = product(a)+product(b)
183+
Base.:+(a::Number,b::Group{:Measures,T,S,N} where {T,S}) where N = a+product(b)
184+
Base.:+(a::Group{:Measures,T,S,N} where {T,S},b::Number) where N = product(a)+b
185+
Base.:+(a::Constant,b::Group{:Measures,T,S,N} where {T,S}) where N = a+product(b)
186+
Base.:+(a::Group{:Measures,T,S,N} where {T,S},b::Constant) where N = product(a)+b
187+
Base.:-(a::Group{:Measures,T,S,N} where {T,S},b::Group{:Measures,T,S,N} where {T,S}) where N = product(a)-product(b)
188+
Base.:-(a::Number,b::Group{:Measures,T,S,N} where {T,S}) where N = a-product(b)
189+
Base.:-(a::Group{:Measures,T,S,N} where {T,S},b::Number) where N = product(a)-b
190+
Base.:-(a::Constant,b::Group{:Measures,T,S,N} where {T,S}) where N = a-product(b)
191+
Base.:-(a::Group{:Measures,T,S,N} where {T,S},b::Constant) where N = product(a)-b
192+
Base.:*(a::Group{:Constants,T,S,N} where {T,S},b::Group{:Measures,T,S,N} where {T,S}) where N = Group(a.v+b.v,coefprod(coef(a),coef(b)),Val(:Measures))
193+
Base.:*(a::Group{:Measures,T,S,N} where {T,S},b::Group{:Constants,T,S,N} where {T,S}) where N = Group(a.v+b.v,coefprod(coef(a),coef(b)),Val(:Measures))
194+
Base.:/(a::Group{:Constants,T,S,N} where {T,S},b::Group{:Measures,T,S,N} where {T,S}) where N = Group(a.v-b.v,coefprod(coef(a),coef(b)),Val(:Measures))
195+
Base.:/(a::Group{:Measures,T,S,N} where {T,S},b::Group{:Constants,T,S,N} where {T,S}) where N = Group(a.v-b.v,coefprod(coef(a),coef(b)),Val(:Measures))
196+
#Base.:+(a::Group{:Constants,T,S,N} where {T,S},b::Group{:Measures,T,S,N} where {T,S}) where {N,G} = Group(a.v+b.v,coefprod(coef(a),coef(b)),Val(G))
197+
#Base.:+(a::Group{:Measures,T,S,N} where {T,S},b::Group{:Constants,T,S,N} where {T,S}) where N = Group(a.v+b.v,coefprod(coef(a),coef(b)),Val(:Measures))
198+
#Base.:-(a::Group{:Constants,T,S,N} where {T,S},b::Group{:Measures,T,S,N} where {T,S}) where {N,G} = Group(a.v+b.v,coefprod(coef(a),coef(b)),Val(G))
199+
#Base.:-(a::Group{:Measures,T,S,N} where {T,S},b::Group{:Constants,T,S,N} where {T,S}) where N = Group(a.v+b.v,coefprod(coef(a),coef(b)),Val(:Measures))
200+
Base.:*(a::Measurements.Measurement,b::Constant{D}) where D = a*D
201+
Base.:*(a::Constant{D},b::Measurements.Measurement) where D = D*b
151202
Base.:/(a::Measurements.Measurement,b::Constant{D}) where D = a*inv(b)
152203
Base.:/(a::Constant{D},b::Measurements.Measurement) where D = a*inv(b)
153-
Base.:+(a::Measurements.Measurement,b::Constant{D}) where D = a+constant(D)
154-
Base.:+(a::Constant{D},b::Measurements.Measurement) where D = constant(D)+b
155-
Base.:-(a::Measurements.Measurement,b::Constant{D}) where D = a-constant(D)
156-
Base.:-(a::Constant{D},b::Measurements.Measurement) where D = constant(D)-b
157-
#=Base.:*(a::Measurements.Measurement,b::Similitude.Constant{D}) where D = a*Constant{D}()
158-
Base.:*(a::Similitude.Constant{D},b::Measurements.Measurement) where D = Constant{D}()*b
159-
Base.:/(a::Measurements.Measurement,b::Similitude.Constant{D}) where D = a*inv(b)
160-
Base.:/(a::Similitude.Constant{D},b::Measurements.Measurement) where D = a*inv(b)=#
161-
Base.:*(a::Similitude.Constant{A},b::Constant{B}) where {A,B} = Constant{A*B}()
162-
Base.:*(a::Constant{A},b::Similitude.Constant{B}) where {A,B} = Constant{A*B}()
163-
Base.:/(a::Similitude.Constant{A},b::Constant{B}) where {A,B} = Constant{A/B}()
164-
Base.:/(a::Constant{A},b::Similitude.Constant{B}) where {A,B} = Constant{A/B}()
204+
Base.:+(a::Measurements.Measurement,b::Constant{D}) where D = a+D
205+
Base.:+(a::Constant{D},b::Measurements.Measurement) where D = D+b
206+
Base.:-(a::Measurements.Measurement,b::Constant{D}) where D = a-D
207+
Base.:-(a::Constant{D},b::Measurements.Measurement) where D = D-b
165208
else
166209
Constant(x) = x
167210
Quantity(x) = Constant(x)

test/runtests.jl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
using MeasureSystems, Test
22

3-
@test 1000normal(molarmass(Metric)) normal(molarmass(Gauss))
4-
@test normal(luminousefficacy(Metric)) 1e7*normal(luminousefficacy(Gauss))
3+
@test 1000normal(molarmass(Metric)) == 1normal(molarmass(Gauss))
4+
@test 1normal(luminousefficacy(Metric)) == 1e7*normal(luminousefficacy(Gauss))

0 commit comments

Comments
 (0)