> On 15 avr. 2016, at 00:48, Nicola Salmoria via swift-evolution > <[email protected]> wrote: > > It might make sense to also have a > > public protocol InvertibleArithmetic : Arithmetic { > func inverted() -> Self > } > > FloatingPoint would conform to this protocol, returning 1/x, while integer > types would not.
I don’t see why this is needed; there isn't an AdditivelyInvertible protocol, why have MultiplicativelyInvertible? Are there (schoolbook arithmetic) types for which a terse inversion operation (i.e. `-num` or `1/num`) is not defined? For what it’s worth, “inverse” has so many definitions that “reciprocal” might be better if this must be defined; it has many fewer definitions. Cheers, Guillaume Lessard _______________________________________________ swift-evolution mailing list [email protected] https://lists.swift.org/mailman/listinfo/swift-evolution
