> On Apr 14, 2016, at 10:36 PM, Stephen Canon <[email protected]> wrote:
> 
> Hi Erica, thanks for the feedback.
> 
>> On Apr 14, 2016, at 6:29 PM, Erica Sadun <[email protected] 
>> <mailto:[email protected]>> wrote:
>> 
>> * I do use % for floating point but not as much as I first thought before I 
>> started searching through my code after reading your e-mail. But when I do 
>> use it, it's nice to have a really familiar symbol rather than a big word. 
>> What were the ways that it was used incorrectly? Do you have some examples?
> 
> As it happens, I have a rationale sitting around from an earlier (internal) 
> discussion:
> 

Thanks. That makes plenty of sense although I do still think the name is long 
and hard to discover compared to fmod[1] and %.

>> * I don't quite get how equatable is going to work. Do you mind explaining 
>> that in more detail?
> 
> I’m not totally sure what your question is.  Are you asking how FloatingPoint 
> will conform to Equatable, or how the Equatable protocol will work?

Given the many words and passionate articles about how difficult it is to 
perform floating point comparisons, 
for example, 
https://randomascii.wordpress.com/2012/02/25/comparing-floating-point-numbers-2012-edition/,
 
I'm just curious as to what approach you've settled on. The topic has come up 
on-list quite a few times.

-- E

[1] Nearly all of what I *thought* I was doing with % did turn out to be fmod 
(CGFloat a = fmodf(stepAngle * i, 360.0))
 so there's that
_______________________________________________
swift-evolution mailing list
[email protected]
https://lists.swift.org/mailman/listinfo/swift-evolution

Reply via email to