<html><head><style>body{font-family:Helvetica,Arial;font-size:13px}</style></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;"><div id="bloop_customfont" style="font-family:Helvetica,Arial;font-size:13px; color: rgba(0,0,0,1.0); margin: 0px; line-height: auto;">I’m not sure how I would feel about this. To be honest I’d avoid such additional changes from the stdlib, because they really don’t belong there. Instead some `Math` module/package would be a better fit than clustering everything into stdlib until we end up also adding UI stuff.</div> <div><br></div>Furthermore, I don’t think a function would make any sense here. It really should be a computed property.<br> <div id="bloop_sign_1501521568263739136" class="bloop_sign"></div> <br><p class="airmail_on">Am 31. Juli 2017 um 19:03:49, Taylor Swift via swift-evolution (<a href="mailto:swift-evolution@swift.org">swift-evolution@swift.org</a>) schrieb:</p> <blockquote type="cite" class="clean_bq"><span><div><div></div><div>
<title></title>
<div dir="ltr">
<div>How would people feel about adding a protocol<br>
<br>
<span style="font-family:monospace,monospace">protocol
MathFloatingPoint:FloatingPoint<br>
{<br>
func sin() -> Self<br>
func cos() -> Self<br>
func tan() -> Self<br>
func asin() -> Self<br>
func acos() -> Self<br>
func atan() -> Self<br>
<br></span></div>
<div><span style="font-family:monospace,monospace"> func ln()
-> Self<br></span></div>
<div><span style="font-family:monospace,monospace"> func
log(base:Self) -> Self<br></span></div>
<div><span style="font-family:monospace,monospace"> func
pow(exponent:Self) -> Self<br></span></div>
<div><span style="font-family:monospace,monospace"> func exp()
-> Self<br></span></div>
<div><span style="font-family:monospace,monospace">}</span><br>
<br></div>
to the standard library? Float and Double would then be made to
conform by default using Swift implementations instead of having to
import Glibc / Darwin and writing the extensions, depending on
platform.<br></div>
_______________________________________________<br>swift-evolution mailing list<br>swift-evolution@swift.org<br>https://lists.swift.org/mailman/listinfo/swift-evolution<br></div></div></span></blockquote></body></html>