Re: [swift-users] module.modulemap documentation

2017-12-03 Thread Frank Swarbrick via swift-users
Well no wonder I couldn’t find it.  So this is a feature of clang/llvm rather 
than Swift?  Interesting!

Thanks much,

Frank

 

From: daniel_dun...@apple.com [mailto:daniel_dun...@apple.com] 
Sent: Sunday, December 3, 2017 8:55 PM
To: Frank Swarbrick ; swift-users@swift.org
Subject: Re: [swift-users] module.modulemap documentation

 

 

On Dec 3, 2017, at 7:42 PM, Frank Swarbrick via swift-users 
 > wrote:

Where are all of the options/parameters/behaviors/whatever documented?  I can’t 
for the life of me find it anywhere.  GINMF.

 

https://clang.llvm.org/docs/Modules.html

 

 - Daniel





 

Frank

___
swift-users mailing list
swift-users@swift.org  
https://lists.swift.org/mailman/listinfo/swift-users

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] module.modulemap documentation

2017-12-03 Thread Daniel Dunbar via swift-users

> On Dec 3, 2017, at 7:42 PM, Frank Swarbrick via swift-users 
>  wrote:
> 
> Where are all of the options/parameters/behaviors/whatever documented?  I 
> can’t for the life of me find it anywhere.  GINMF.

https://clang.llvm.org/docs/Modules.html

 - Daniel

>  
> Frank
> ___
> swift-users mailing list
> swift-users@swift.org
> https://lists.swift.org/mailman/listinfo/swift-users
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


[swift-users] module.modulemap documentation

2017-12-03 Thread Frank Swarbrick via swift-users
Where are all of the options/parameters/behaviors/whatever documented?  I
can't for the life of me find it anywhere.  GINMF.

 

Frank

___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


[swift-users] TWISt-shout Newsletter 2017-12-04

2017-12-03 Thread Kenny Leung via swift-users
Hi All.

Here is your TWISt-shout Newsletter for the week of 2017-11-27 to 2017-12-03

https://github.com/pepperdog/TWISt-shout/blob/master/2017/TWISt-shout-2017-12-04.md
 


Enjoy!

-Kenny


___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] FloatingPoint/BinaryFloatingPoint protocol and concrete FloatingPoint types

2017-12-03 Thread David Sweeris via swift-users
Sorry, mostly I was just commenting on what I now see was an incorrect 
interpretation of the “// but something actually requiring high precision ...” 
comment in your example code. I’d read it as... you know, I’m not sure what I’d 
though it said... I think something that implied the code would convert the 
`Float80` data to another format with higher precision.

My mistake for not reading more carefully before replying.

- Dave Sweeris 

> On Dec 3, 2017, at 15:22, Jens Persson  wrote:
> 
> I'm not sure what you mean David. That function was just part of my attempt 
> at presenting a solution to Antonino's question (that particular function is 
> from Antonino's code).
> Below is my solution to Antonino's problem again, including a perhaps clearer 
> comment in that function:
> 
> protocol Float80Convertible : BinaryFloatingPoint {
> init(_ value: Float80)
> var float80: Float80 { get }
> }
> extension Double : Float80Convertible {
> var float80: Float80 { return Float80(self) }
> }
> extension Float : Float80Convertible {
> var float80: Float80 { return Float80(self) }
> }
> 
> func maxPrecisionCalculation(input:Float80) -> Float80 {
> return inpu
> // In the actual use case, this would of course not just
> // return input. Instead it would perform some computation
> // that (in contrast to just returning input) actually needs
> // the high precision of Float80.
> }
> 
> func someComplexCalculation(input: T) -> T {
> let input80 = input.float80
> let output80 = maxPrecisionCalculation(input: input80)
> return T(output80)
> }
> 
> /Jens
> 
> 
>> On Fri, Dec 1, 2017 at 11:59 PM, David Sweeris  wrote:
>> 
>> 
>>> On Dec 1, 2017, at 13:18, Jens Persson via swift-users 
>>>  wrote:
>>> 
>>> func maxPrecisionCalculation(input:Float80) -> Float80 {
>>> return input // but something actually reauiring high precision ...
>>> }
>> 
>> AFAIK, Float80 is the high precision format on macOS (well, Intel macs, 
>> anyway... can’t recall if Swift can target OSs old enough to run on PPC 
>> macs). I’d avoid using it, though. AFAIK it’s an x86-only format (it might 
>> even be Intel-only... 5-10 minutes of googling didn’t give me a clear answer 
>> on whether AMD’s CPUs support it).
>> 
>> I don’t know what we do with it on ARM targets, and I’m not at my computer 
>> to try to figure out.
>> 
>> Unless maybe the x86 or ARM vector extensions support 128 or 256 bit floats? 
>> I don’t think they do, but I’m not 100% on that.
>> 
>> - Dave Sweeris
> 
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users


Re: [swift-users] FloatingPoint/BinaryFloatingPoint protocol and concrete FloatingPoint types

2017-12-03 Thread Jens Persson via swift-users
I'm not sure what you mean David. That function was just part of my attempt
at presenting a solution to Antonino's question (that particular function
is from Antonino's code).
Below is my solution to Antonino's problem again, including a perhaps
clearer comment in that function:

protocol Float80Convertible : BinaryFloatingPoint {
init(_ value: Float80)
var float80: Float80 { get }
}
extension Double : Float80Convertible {
var float80: Float80 { return Float80(self) }
}
extension Float : Float80Convertible {
var float80: Float80 { return Float80(self) }
}

func maxPrecisionCalculation(input:Float80) -> Float80 {
return inpu
// In the actual use case, this would of course not just
// return input. Instead it would perform some computation
// that (in contrast to just returning input) actually needs
// the high precision of Float80.
}

func someComplexCalculation(input: T) -> T {
let input80 = input.float80
let output80 = maxPrecisionCalculation(input: input80)
return T(output80)
}

/Jens


On Fri, Dec 1, 2017 at 11:59 PM, David Sweeris  wrote:

>
>
> On Dec 1, 2017, at 13:18, Jens Persson via swift-users <
> swift-users@swift.org> wrote:
>
> func maxPrecisionCalculation(input:Float80) -> Float80 {
> return input // but something actually reauiring high precision ...
> }
>
>
> AFAIK, Float80 *is* the high precision format on macOS (well, Intel macs,
> anyway... can’t recall if Swift can target OSs old enough to run on PPC
> macs). I’d avoid using it, though. AFAIK it’s an x86-only format (it might
> even be Intel-only... 5-10 minutes of googling didn’t give me a clear
> answer on whether AMD’s CPUs support it).
>
> I don’t know what we do with it on ARM targets, and I’m not at my computer
> to try to figure out.
>
> Unless maybe the x86 or ARM vector extensions support 128 or 256 bit
> floats? I don’t think they do, but I’m not 100% on that.
>
> - Dave Sweeris
>
___
swift-users mailing list
swift-users@swift.org
https://lists.swift.org/mailman/listinfo/swift-users