@@ -360,110 +360,189 @@ extern "rust-intrinsic" {
360
360
/// Perform a volatile store to the `dst` pointer.
361
361
pub fn volatile_store < T > ( dst : * mut T , val : T ) ;
362
362
363
+ /// Returns the square root of an `f32`
363
364
pub fn sqrtf32 ( x : f32 ) -> f32 ;
365
+ /// Returns the square root of an `f64`
364
366
pub fn sqrtf64 ( x : f64 ) -> f64 ;
365
367
368
+ /// Raises an `f32` to an integer power.
366
369
pub fn powif32 ( a : f32 , x : i32 ) -> f32 ;
370
+ /// Raises an `f64` to an integer power.
367
371
pub fn powif64 ( a : f64 , x : i32 ) -> f64 ;
368
372
373
+ /// Returns the sine of an `f32`.
369
374
pub fn sinf32 ( x : f32 ) -> f32 ;
375
+ /// Returns the sine of an `f64`.
370
376
pub fn sinf64 ( x : f64 ) -> f64 ;
371
377
378
+ /// Returns the cosine of an `f32`.
372
379
pub fn cosf32 ( x : f32 ) -> f32 ;
380
+ /// Returns the cosine of an `f64`.
373
381
pub fn cosf64 ( x : f64 ) -> f64 ;
374
382
383
+ /// Raises an `f32` to an `f32` power.
375
384
pub fn powf32 ( a : f32 , x : f32 ) -> f32 ;
385
+ /// Raises an `f64` to an `f64` power.
376
386
pub fn powf64 ( a : f64 , x : f64 ) -> f64 ;
377
387
388
+ /// Returns the exponential of an `f32`.
378
389
pub fn expf32 ( x : f32 ) -> f32 ;
390
+ /// Returns the exponential of an `f64`.
379
391
pub fn expf64 ( x : f64 ) -> f64 ;
380
392
393
+ /// Returns 2 raised to the power of an `f32`.
381
394
pub fn exp2f32 ( x : f32 ) -> f32 ;
395
+ /// Returns 2 raised to the power of an `f64`.
382
396
pub fn exp2f64 ( x : f64 ) -> f64 ;
383
397
398
+ /// Returns the natural logarithm of an `f32`.
384
399
pub fn logf32 ( x : f32 ) -> f32 ;
400
+ /// Returns the natural logarithm of an `f64`.
385
401
pub fn logf64 ( x : f64 ) -> f64 ;
386
402
403
+ /// Returns the base 10 logarithm of an `f32`.
387
404
pub fn log10f32 ( x : f32 ) -> f32 ;
405
+ /// Returns the base 10 logarithm of an `f64`.
388
406
pub fn log10f64 ( x : f64 ) -> f64 ;
389
407
408
+ /// Returns the base 2 logarithm of an `f32`.
390
409
pub fn log2f32 ( x : f32 ) -> f32 ;
410
+ /// Returns the base 2 logarithm of an `f64`.
391
411
pub fn log2f64 ( x : f64 ) -> f64 ;
392
412
413
+ /// Returns `a * b + c` for `f32` values.
393
414
pub fn fmaf32 ( a : f32 , b : f32 , c : f32 ) -> f32 ;
415
+ /// Returns `a * b + c` for `f64` values.
394
416
pub fn fmaf64 ( a : f64 , b : f64 , c : f64 ) -> f64 ;
395
417
418
+ /// Returns the absolute value of an `f32`.
396
419
pub fn fabsf32 ( x : f32 ) -> f32 ;
420
+ /// Returns the absolute value of an `f64`.
397
421
pub fn fabsf64 ( x : f64 ) -> f64 ;
398
422
423
+ /// Copies the sign from `y` to `x` for `f32` values.
399
424
pub fn copysignf32 ( x : f32 , y : f32 ) -> f32 ;
425
+ /// Copies the sign from `y` to `x` for `f64` values.
400
426
pub fn copysignf64 ( x : f64 , y : f64 ) -> f64 ;
401
427
428
+ /// Returns the largest integer less than or equal to an `f32`.
402
429
pub fn floorf32 ( x : f32 ) -> f32 ;
430
+ /// Returns the largest integer less than or equal to an `f64`.
403
431
pub fn floorf64 ( x : f64 ) -> f64 ;
404
432
433
+ /// Returns the smallest integer greater than or equal to an `f32`.
405
434
pub fn ceilf32 ( x : f32 ) -> f32 ;
435
+ /// Returns the smallest integer greater than or equal to an `f64`.
406
436
pub fn ceilf64 ( x : f64 ) -> f64 ;
407
437
438
+ /// Returns the integer part of an `f32`.
408
439
pub fn truncf32 ( x : f32 ) -> f32 ;
440
+ /// Returns the integer part of an `f64`.
409
441
pub fn truncf64 ( x : f64 ) -> f64 ;
410
442
443
+ /// Returns the nearest integer to an `f32`. May raise an inexact floating-point exception
444
+ /// if the argument is not an integer.
411
445
pub fn rintf32 ( x : f32 ) -> f32 ;
446
+ /// Returns the nearest integer to an `f64`. May raise an inexact floating-point exception
447
+ /// if the argument is not an integer.
412
448
pub fn rintf64 ( x : f64 ) -> f64 ;
413
449
450
+ /// Returns the nearest integer to an `f32`.
414
451
pub fn nearbyintf32 ( x : f32 ) -> f32 ;
452
+ /// Returns the nearest integer to an `f64`.
415
453
pub fn nearbyintf64 ( x : f64 ) -> f64 ;
416
454
455
+ /// Returns the nearest integer to an `f32`. Rounds half-way cases away from zero.
417
456
pub fn roundf32 ( x : f32 ) -> f32 ;
457
+ /// Returns the nearest integer to an `f64`. Rounds half-way cases away from zero.
418
458
pub fn roundf64 ( x : f64 ) -> f64 ;
419
459
460
+ /// Returns the number of bits set in a `u8`.
420
461
pub fn ctpop8 ( x : u8 ) -> u8 ;
462
+ /// Returns the number of bits set in a `u16`.
421
463
pub fn ctpop16 ( x : u16 ) -> u16 ;
464
+ /// Returns the number of bits set in a `u32`.
422
465
pub fn ctpop32 ( x : u32 ) -> u32 ;
466
+ /// Returns the number of bits set in a `u64`.
423
467
pub fn ctpop64 ( x : u64 ) -> u64 ;
424
468
469
+ /// Returns the number of leading bits unset in a `u8`.
425
470
pub fn ctlz8 ( x : u8 ) -> u8 ;
471
+ /// Returns the number of leading bits unset in a `u16`.
426
472
pub fn ctlz16 ( x : u16 ) -> u16 ;
473
+ /// Returns the number of leading bits unset in a `u32`.
427
474
pub fn ctlz32 ( x : u32 ) -> u32 ;
475
+ /// Returns the number of leading bits unset in a `u64`.
428
476
pub fn ctlz64 ( x : u64 ) -> u64 ;
429
477
478
+ /// Returns the number of trailing bits unset in a `u8`.
430
479
pub fn cttz8 ( x : u8 ) -> u8 ;
480
+ /// Returns the number of trailing bits unset in a `u16`.
431
481
pub fn cttz16 ( x : u16 ) -> u16 ;
482
+ /// Returns the number of trailing bits unset in a `u32`.
432
483
pub fn cttz32 ( x : u32 ) -> u32 ;
484
+ /// Returns the number of trailing bits unset in a `u64`.
433
485
pub fn cttz64 ( x : u64 ) -> u64 ;
434
486
487
+ /// Reverses the bytes in a `u16`.
435
488
pub fn bswap16 ( x : u16 ) -> u16 ;
489
+ /// Reverses the bytes in a `u32`.
436
490
pub fn bswap32 ( x : u32 ) -> u32 ;
491
+ /// Reverses the bytes in a `u64`.
437
492
pub fn bswap64 ( x : u64 ) -> u64 ;
438
493
494
+ /// Performs checked `i8` addition.
439
495
pub fn i8_add_with_overflow ( x : i8 , y : i8 ) -> ( i8 , bool ) ;
496
+ /// Performs checked `i16` addition.
440
497
pub fn i16_add_with_overflow ( x : i16 , y : i16 ) -> ( i16 , bool ) ;
498
+ /// Performs checked `i32` addition.
441
499
pub fn i32_add_with_overflow ( x : i32 , y : i32 ) -> ( i32 , bool ) ;
500
+ /// Performs checked `i64` addition.
442
501
pub fn i64_add_with_overflow ( x : i64 , y : i64 ) -> ( i64 , bool ) ;
443
502
503
+ /// Performs checked `u8` addition.
444
504
pub fn u8_add_with_overflow ( x : u8 , y : u8 ) -> ( u8 , bool ) ;
505
+ /// Performs checked `u16` addition.
445
506
pub fn u16_add_with_overflow ( x : u16 , y : u16 ) -> ( u16 , bool ) ;
507
+ /// Performs checked `u32` addition.
446
508
pub fn u32_add_with_overflow ( x : u32 , y : u32 ) -> ( u32 , bool ) ;
509
+ /// Performs checked `u64` addition.
447
510
pub fn u64_add_with_overflow ( x : u64 , y : u64 ) -> ( u64 , bool ) ;
448
511
512
+ /// Performs checked `i8` subtraction.
449
513
pub fn i8_sub_with_overflow ( x : i8 , y : i8 ) -> ( i8 , bool ) ;
514
+ /// Performs checked `i16` subtraction.
450
515
pub fn i16_sub_with_overflow ( x : i16 , y : i16 ) -> ( i16 , bool ) ;
516
+ /// Performs checked `i32` subtraction.
451
517
pub fn i32_sub_with_overflow ( x : i32 , y : i32 ) -> ( i32 , bool ) ;
518
+ /// Performs checked `i64` subtraction.
452
519
pub fn i64_sub_with_overflow ( x : i64 , y : i64 ) -> ( i64 , bool ) ;
453
520
521
+ /// Performs checked `u8` subtraction.
454
522
pub fn u8_sub_with_overflow ( x : u8 , y : u8 ) -> ( u8 , bool ) ;
523
+ /// Performs checked `u16` subtraction.
455
524
pub fn u16_sub_with_overflow ( x : u16 , y : u16 ) -> ( u16 , bool ) ;
525
+ /// Performs checked `u32` subtraction.
456
526
pub fn u32_sub_with_overflow ( x : u32 , y : u32 ) -> ( u32 , bool ) ;
527
+ /// Performs checked `u64` subtraction.
457
528
pub fn u64_sub_with_overflow ( x : u64 , y : u64 ) -> ( u64 , bool ) ;
458
529
530
+ /// Performs checked `i8` multiplication.
459
531
pub fn i8_mul_with_overflow ( x : i8 , y : i8 ) -> ( i8 , bool ) ;
532
+ /// Performs checked `i16` multiplication.
460
533
pub fn i16_mul_with_overflow ( x : i16 , y : i16 ) -> ( i16 , bool ) ;
534
+ /// Performs checked `i32` multiplication.
461
535
pub fn i32_mul_with_overflow ( x : i32 , y : i32 ) -> ( i32 , bool ) ;
536
+ /// Performs checked `i64` multiplication.
462
537
pub fn i64_mul_with_overflow ( x : i64 , y : i64 ) -> ( i64 , bool ) ;
463
538
539
+ /// Performs checked `u8` multiplication.
464
540
pub fn u8_mul_with_overflow ( x : u8 , y : u8 ) -> ( u8 , bool ) ;
541
+ /// Performs checked `u16` multiplication.
465
542
pub fn u16_mul_with_overflow ( x : u16 , y : u16 ) -> ( u16 , bool ) ;
543
+ /// Performs checked `u32` multiplication.
466
544
pub fn u32_mul_with_overflow ( x : u32 , y : u32 ) -> ( u32 , bool ) ;
545
+ /// Performs checked `u64` multiplication.
467
546
pub fn u64_mul_with_overflow ( x : u64 , y : u64 ) -> ( u64 , bool ) ;
468
547
}
469
548
0 commit comments