@@ -1291,7 +1291,6 @@ fn test_non_determinism() {
1291
1291
for ( idx1, res1) in results {
1292
1292
for ( idx2, res2) in results {
1293
1293
if idx1 == idx2 {
1294
- assert_eq!( res1, res2) ;
1295
1294
continue ;
1296
1295
}
1297
1296
assert_approx_eq ! ( res1, res2) ;
@@ -1324,29 +1323,61 @@ fn test_non_determinism() {
1324
1323
pub fn test_operations_f32 ( a : f32 , b : f32 ) {
1325
1324
test_operations_f ! ( a, b) ;
1326
1325
test_operation ! ( a, b, f32 :: log) ;
1327
- test_operation ! ( a, f32 :: cos) ;
1328
1326
test_operation ! ( a, f32 :: exp) ;
1329
- test_operation ! ( a, f32 :: exp2) ;
1330
- test_operation ! ( a, f32 :: log2) ;
1331
- test_operation ! ( a, f32 :: log10) ;
1332
- test_operation ! ( a, f32 :: sin) ;
1333
1327
}
1334
1328
pub fn test_operations_f64 ( a : f64 , b : f64 ) {
1335
1329
test_operations_f ! ( a, b) ;
1336
1330
test_operation ! ( a, b, f64 :: log) ;
1337
- test_operation ! ( a, f64 :: cos) ;
1338
1331
test_operation ! ( a, f64 :: exp) ;
1339
- test_operation ! ( a, f64 :: exp2) ;
1340
- test_operation ! ( a, f64 :: log2) ;
1341
- test_operation ! ( a, f64 :: log10) ;
1342
- test_operation ! ( a, f64 :: sin) ;
1343
1332
}
1344
1333
pub fn test_operations_f128 ( a : f128 , b : f128 ) {
1345
1334
test_operations_f ! ( a, b) ;
1346
1335
}
1347
1336
1337
+ pub fn test_extras ( ) {
1338
+ // f32
1339
+ test_operation ! ( 10f32 , f32 :: exp2) ;
1340
+ test_operation ! ( f32 :: consts:: E , f32 :: ln) ;
1341
+ test_operation ! ( 0f32 , f32 :: ln_1p) ;
1342
+ test_operation ! ( 10f32 , f32 :: log10) ;
1343
+ test_operation ! ( 8f32 , f32 :: log2) ;
1344
+ test_operation ! ( 27.0f32 , f32 :: cbrt) ;
1345
+ test_operation ! ( 3.0f32 , 4.0f32 , f32 :: hypot) ;
1346
+ test_operation ! ( 0f32 , f32 :: sin) ;
1347
+ test_operation ! ( 0f32 , f32 :: cos) ;
1348
+ test_operation ! ( 1.0f32 , f32 :: sinh) ;
1349
+ test_operation ! ( 1.0f32 , f32 :: asinh) ;
1350
+ test_operation ! ( 1.0f32 , f32 :: cosh) ;
1351
+ test_operation ! ( 2.0f32 , f32 :: acosh) ;
1352
+ test_operation ! ( 1.0f32 , f32 :: tan) ;
1353
+ test_operation ! ( 1.0f32 , f32 :: tanh) ;
1354
+ test_operation ! ( 1.0f32 , 2.0f32 , f32 :: atan2) ;
1355
+ test_operation ! ( 0.5f32 , f32 :: atanh) ;
1356
+ test_operation ! ( 5.0f32 , f32 :: gamma) ;
1357
+
1358
+ // f64
1359
+ test_operation ! ( 50f64 , f64 :: exp2) ;
1360
+ test_operation ! ( 1f64 , f64 :: ln) ;
1361
+ test_operation ! ( 0f64 , f64 :: ln_1p) ;
1362
+ test_operation ! ( f64 :: consts:: E , f64 :: log10) ;
1363
+ test_operation ! ( f64 :: consts:: E , f64 :: log2) ;
1364
+ test_operation ! ( 0f64 , f64 :: sin) ;
1365
+ test_operation ! ( 0f64 , f64 :: cos) ;
1366
+ test_operation ! ( 27.0f64 , f64 :: cbrt) ;
1367
+ test_operation ! ( 3.0f64 , 4.0f64 , f64 :: hypot) ;
1368
+ test_operation ! ( 1.0f64 , f64 :: sinh) ;
1369
+ test_operation ! ( 1.0f64 , f64 :: asinh) ;
1370
+ test_operation ! ( 1.0f64 , f64 :: cosh) ;
1371
+ test_operation ! ( 3.0f64 , f64 :: acosh) ;
1372
+ test_operation ! ( 1.0f64 , f64 :: tan) ;
1373
+ test_operation ! ( 1.0f64 , f64 :: tanh) ;
1374
+ test_operation ! ( 0.5f64 , f64 :: atanh) ;
1375
+ test_operation ! ( 5.0f64 , f64 :: gamma) ;
1376
+ }
1377
+
1348
1378
test_operations_f16( 5. , 7 . ) ;
1349
1379
test_operations_f32( 12. , 4. ) ;
1350
1380
test_operations_f64( 19. , 11. ) ;
1351
1381
test_operations_f128( 25. , 18. ) ;
1382
+ test_extras( ) ;
1352
1383
}
0 commit comments