Suppose that I have a generic function that makes a complex floating calculation
with a generic floating point type.
Suppose that calculation require the max floating point machine precision so:
1) I need to convert the generic floating point type to Float80
2) make the complex calculation with
There are different algorithms for Element==CGPoint, Element==[CGPoint],
Element==[AreaPoint], etc…
Your second suggestion work:
protocol Inertial {
funcconvexHull( _ t:AffineTransform? ) -> [CGPoint]
funcarea( _ t:AffineTransform? ) -> CGFloat
func
I’have a protocol:
protocol Inertial {
funcconvexHull( _ t:AffineTransform? ) -> [CGPoint]
funcarea( _ t:AffineTransform? ) -> CGFloat
funcfirstOrderMomentums( _ t:AffineTransform? ) ->
(x:CGFloat,y:CGFloat)
funcsecondOrderMomentums( _
need to support that functionality.
>
> Double check if the code compiles, I wrote it on my iPhone, but you get the
> idea now.
>
> --
> Adrian Zubarev
> Sent with Airmail
> Am 25. November 2017 um 07:40:25, Antonino Ficarra via swift-users
> (swift-users@swift.or
In this code example:
import Foundation
protocol AreaProtocol {
funcarea() -> CGFloat
// implemented in protocol extension
funcvolume( height:CGFloat ) -> CGFloat
//
}
extension AreaProtocol {
funcvolume( height:CGFloat ) ->
- Why Swift continues to not support Float80 math functions?
Example:
print("\( log( Float( 1.0 ) ) )")
print("\( log( Double( 1.0 ) ) )")
// print("\( log( Float80( 1.0 ) ) )") // don’t compile and logl is unavailable
- Why min and max continue to not act like fmin and fmax (IEEE 754
- Why Swift continues to not support Float80 math functions?
Example:
print("\( log( Float( 1.0 ) ) )")
print("\( log( Double( 1.0 ) ) )")
// print("\( log( Float80( 1.0 ) ) )") // don’t compile and logl is unavailable
- Why min and max continue to not act like fmin and fmax (IEEE 754
How make Float80 bridge with long double math.h c functions?
I resorts to use some orrible hacks like these:
// in f80.h
extern void sqrt_f80( void *result, const void *v );
extern void pow_f80( void *result, const void *v, const void *e );
...
// in f80.c
void sqrt_f80( void *result, const