File tree 2 files changed +14
-4
lines changed
2 files changed +14
-4
lines changed Original file line number Diff line number Diff line change @@ -132,7 +132,11 @@ struct Float32
132
132
end
133
133
134
134
def ** (other : Int32 )
135
- LibM .powi_f32(self , other)
135
+ {% if flag?(:win32 ) % }
136
+ self ** other.to_f32
137
+ {% else % }
138
+ LibM .powi_f32(self , other)
139
+ {% end % }
136
140
end
137
141
138
142
def ** (other : Float32 )
@@ -191,7 +195,11 @@ struct Float64
191
195
end
192
196
193
197
def ** (other : Int32 )
194
- LibM .powi_f64(self , other)
198
+ {% if flag?(:win32 ) % }
199
+ self ** other.to_f64
200
+ {% else % }
201
+ LibM .powi_f64(self , other)
202
+ {% end % }
195
203
end
196
204
197
205
def ** (other : Float64 )
Original file line number Diff line number Diff line change @@ -37,8 +37,10 @@ lib LibM
37
37
fun max_f64 = "llvm.maxnum.f64" (value1 : Float64 , value2 : Float64 ) : Float64
38
38
fun pow_f32 = "llvm.pow.f32" (value : Float32 , power : Float32 ) : Float32
39
39
fun pow_f64 = "llvm.pow.f64" (value : Float64 , power : Float64 ) : Float64
40
- fun powi_f32 = "llvm.powi.f32" (value : Float32 , power : Int32 ) : Float32
41
- fun powi_f64 = "llvm.powi.f64" (value : Float64 , power : Int32 ) : Float64
40
+ {% unless flag?(:win32 ) % }
41
+ fun powi_f32 = "llvm.powi.f32" (value : Float32 , power : Int32 ) : Float32
42
+ fun powi_f64 = "llvm.powi.f64" (value : Float64 , power : Int32 ) : Float64
43
+ {% end % }
42
44
fun round_f32 = "llvm.round.f32" (value : Float32 ) : Float32
43
45
fun round_f64 = "llvm.round.f64" (value : Float64 ) : Float64
44
46
fun sin_f32 = "llvm.sin.f32" (value : Float32 ) : Float32
You can’t perform that action at this time.
0 commit comments