Re: [swift-users] Difficulties extending BinaryFloatingPoint

2017-01-05 Thread Jens Persson via swift-users
Great, thank you Steve! On Thu, Jan 5, 2017 at 5:04 PM, Steve (Numerics) Canon wrote: > Hi Jens — > > BinaryFloatingPoint is very deliberately limited to the arithmetic > operations required by IEEE 754. This is the minimal set of operations that > a binary floating point type should provide, b

Re: [swift-users] Difficulties extending BinaryFloatingPoint

2017-01-05 Thread Steve (Numerics) Canon via swift-users
Hi Jens — BinaryFloatingPoint is very deliberately limited to the arithmetic operations required by IEEE 754. This is the minimal set of operations that a binary floating point type should provide, but it's already a really large implementation burden for someone who wants to implement their ow

[swift-users] Difficulties extending BinaryFloatingPoint

2017-01-05 Thread Jens Persson via swift-users
The code below doesn't compile since there is no exponential function (exp) that works on all FloatingPoint or BinaryFloatingPoint types, also no protocol seems to define the power function or the constant e, although they do define for example: basic arithmetic operators, squareRoot() and pi. ext