@@ -247,27 +247,27 @@ MathTests.test("${T}") {
247
247
// SWIFT_ENABLE_TENSORFLOW
248
248
% for T in [ 'Float', 'Float80 '] :
249
249
MathTests. test ( " gradient_${T} " ) {
250
- expectEqualWithTolerance ( 7.3890560989306502274 , gradient ( at: 2.0 as ${ T} , in: exp) , ulps: 16 )
251
- expectEqualWithTolerance ( 2.772588722239781145 , gradient ( at: 2.0 as ${ T} , in: exp2) , ulps: 16 )
252
- expectEqualWithTolerance ( 7.3890560989306502274 , gradient ( at: 2.0 as ${ T} , in: expm1) , ulps: 16 )
253
- expectEqualWithTolerance ( 0.5 , gradient ( at: 2.0 as ${ T} , in: log) , ulps: 16 )
254
- expectEqualWithTolerance ( 0.21714724095162590833 , gradient ( at: 2.0 as ${ T} , in: log10) , ulps: 16 )
255
- expectEqualWithTolerance ( 0.7213475204444817278 , gradient ( at: 2.0 as ${ T} , in: log2) , ulps: 16 )
256
- expectEqualWithTolerance ( 0.33333333333333333334 , gradient ( at: 2.0 as ${ T} , in: log1p) , ulps: 16 )
257
- expectEqualWithTolerance ( 5.774399204041917612 , gradient ( at: 2.0 as ${ T} , in: tan) , ulps: 16 )
258
- expectEqualWithTolerance ( - 0.9092974268256816954 , gradient ( at: 2.0 as ${ T} , in: cos) , ulps: 16 )
259
- expectEqualWithTolerance ( - 0.416146836547142387 , gradient ( at: 2.0 as ${ T} , in: sin) , ulps: 16 )
260
- expectEqualWithTolerance ( 1.154700538379251529 , gradient ( at: 0.5 as ${ T} , in: asin) , ulps: 16 )
261
- expectEqualWithTolerance ( - 1.154700538379251529 , gradient ( at: 0.5 as ${ T} , in: acos) , ulps: 16 )
262
- expectEqualWithTolerance ( 0.8 , gradient ( at: 0.5 as ${ T} , in: atan) , ulps: 16 )
263
- expectEqualWithTolerance ( 3.7621956910836314597 , gradient ( at: 2.0 as ${ T} , in: sinh) , ulps: 16 )
264
- expectEqualWithTolerance ( 3.6268604078470187677 , gradient ( at: 2.0 as ${ T} , in: cosh) , ulps: 16 )
265
- expectEqualWithTolerance ( 0.07065082485316446565 , gradient ( at: 2.0 as ${ T} , in: tanh) , ulps: 16 )
266
- expectEqualWithTolerance ( 0.44721359549995793928 , gradient ( at: 2.0 as ${ T} , in: asinh) , ulps: 16 )
267
- expectEqualWithTolerance ( 0.5773502691896257645 , gradient ( at: 2.0 as ${ T} , in: acosh) , ulps: 16 )
268
- expectEqualWithTolerance ( 1.3333333333333333334 , gradient ( at: 0.5 as ${ T} , in: atanh) , ulps: 16 )
269
- expectEqualWithTolerance ( 0.020666985354092053575 , gradient ( at: 2.0 as ${ T} , in: erf) , ulps: 16 )
270
- expectEqualWithTolerance ( - 0.020666985354092053575 , gradient ( at: 2.0 as ${ T} , in: erfc) , ulps: 16 )
250
+ expectEqualWithTolerance ( 7.3890560989306502274 , gradient ( at: 2.0 as ${ T} , in: exp) , ulps: 16 )
251
+ expectEqualWithTolerance ( 2.772588722239781145 , gradient ( at: 2.0 as ${ T} , in: exp2) , ulps: 16 )
252
+ expectEqualWithTolerance ( 7.3890560989306502274 , gradient ( at: 2.0 as ${ T} , in: expm1) , ulps: 16 )
253
+ expectEqualWithTolerance ( 0.5 , gradient ( at: 2.0 as ${ T} , in: log) , ulps: 16 )
254
+ expectEqualWithTolerance ( 0.21714724095162590833 , gradient ( at: 2.0 as ${ T} , in: log10) , ulps: 16 )
255
+ expectEqualWithTolerance ( 0.7213475204444817278 , gradient ( at: 2.0 as ${ T} , in: log2) , ulps: 16 )
256
+ expectEqualWithTolerance ( 0.33333333333333333334 , gradient ( at: 2.0 as ${ T} , in: log1p) , ulps: 16 )
257
+ expectEqualWithTolerance ( 5.774399204041917612 , gradient ( at: 2.0 as ${ T} , in: tan) , ulps: 16 )
258
+ expectEqualWithTolerance ( - 0.9092974268256816954 , gradient ( at: 2.0 as ${ T} , in: cos) , ulps: 16 )
259
+ expectEqualWithTolerance ( - 0.416146836547142387 , gradient ( at: 2.0 as ${ T} , in: sin) , ulps: 16 )
260
+ expectEqualWithTolerance ( 1.154700538379251529 , gradient ( at: 0.5 as ${ T} , in: asin) , ulps: 16 )
261
+ expectEqualWithTolerance ( - 1.154700538379251529 , gradient ( at: 0.5 as ${ T} , in: acos) , ulps: 16 )
262
+ expectEqualWithTolerance ( 0.8 , gradient ( at: 0.5 as ${ T} , in: atan) , ulps: 16 )
263
+ expectEqualWithTolerance ( 3.7621956910836314597 , gradient ( at: 2.0 as ${ T} , in: sinh) , ulps: 16 )
264
+ expectEqualWithTolerance ( 3.6268604078470187677 , gradient ( at: 2.0 as ${ T} , in: cosh) , ulps: 16 )
265
+ expectEqualWithTolerance ( 0.07065082485316446565 , gradient ( at: 2.0 as ${ T} , in: tanh) , ulps: 16 )
266
+ expectEqualWithTolerance ( 0.44721359549995793928 , gradient ( at: 2.0 as ${ T} , in: asinh) , ulps: 16 )
267
+ expectEqualWithTolerance ( 0.5773502691896257645 , gradient ( at: 2.0 as ${ T} , in: acosh) , ulps: 16 )
268
+ expectEqualWithTolerance ( 1.3333333333333333334 , gradient ( at: 0.5 as ${ T} , in: atanh) , ulps: 16 )
269
+ expectEqualWithTolerance ( 0.020666985354092053575 , gradient ( at: 2.0 as ${ T} , in: erf) , ulps: 16 )
270
+ expectEqualWithTolerance ( - 0.020666985354092053575 , gradient ( at: 2.0 as ${ T} , in: erfc) , ulps: 16 )
271
271
}
272
272
% end
273
273
0 commit comments