|
44 | 44 | Base.:-(l::UnionAbstractQuantity) = new_quantity(typeof(l), -ustrip(l), dimension(l))
|
45 | 45 |
|
46 | 46 | # Combining different abstract types
|
47 |
| -for op in (:*, :/, :+, :-, :div), |
| 47 | +for op in (:*, :/, :+, :-, :div, :atan, :atand, :copysign, :flipsign, :mod), |
48 | 48 | (t1, _, _) in ABSTRACT_QUANTITY_TYPES,
|
49 | 49 | (t2, _, _) in ABSTRACT_QUANTITY_TYPES
|
50 | 50 |
|
@@ -126,7 +126,6 @@ for (type, base_type, _) in ABSTRACT_QUANTITY_TYPES, f in (:atan, :atand)
|
126 | 126 | end
|
127 | 127 | function Base.$f(y::$type, x::$type)
|
128 | 128 | dimension(y) == dimension(x) || throw(DimensionError(y, x))
|
129 |
| - y, x = promote(y, x) |
130 | 129 | return $f(ustrip(y), ustrip(x))
|
131 | 130 | end
|
132 | 131 | function Base.$f(y::$type, x::$base_type)
|
|
143 | 142 |
|
144 | 143 | ############################## Same dimension as input ##################################
|
145 | 144 | for f in (
|
146 |
| - :abs, :real, :imag, :conj, :adjoint, :unsigned, :nextfloat, :prevfloat, |
147 |
| - :identity, :transpose, |
| 145 | + :float, :abs, :real, :imag, :conj, :adjoint, :unsigned, |
| 146 | + :nextfloat, :prevfloat, :identity, :transpose, |
148 | 147 | )
|
149 | 148 | @eval function Base.$f(q::UnionAbstractQuantity)
|
150 | 149 | return new_quantity(typeof(q), $f(ustrip(q)), dimension(q))
|
|
0 commit comments