| ... | ... | @@ -644,32 +644,41 @@ export fn fmod(x: f64, y: f64) f64 { |
| 644 | 644 | export fn floorf(x: f32) f32 { |
| 645 | 645 | return math.floor(x); |
| 646 | 646 | } |
| 647 | | |
| 648 | | export fn ceilf(x: f32) f32 { |
| 649 | | return math.ceil(x); |
| 650 | | } |
| 651 | | |
| 652 | 647 | export fn floor(x: f64) f64 { |
| 653 | 648 | return math.floor(x); |
| 654 | 649 | } |
| 650 | export fn floorl(x: c_longdouble) c_longdouble { |
| 651 | if (!long_double_is_f128) { |
| 652 | @panic("TODO implement this"); |
| 653 | } |
| 654 | return math.floor(x); |
| 655 | } |
| 655 | 656 | |
| 657 | export fn ceilf(x: f32) f32 { |
| 658 | return math.ceil(x); |
| 659 | } |
| 656 | 660 | export fn ceil(x: f64) f64 { |
| 657 | 661 | return math.ceil(x); |
| 658 | 662 | } |
| 659 | | |
| 660 | | export fn fmal(a: c_longdouble, b: c_longdouble, c: c_longdouble) c_longdouble { |
| 663 | export fn ceill(x: c_longdouble) c_longdouble { |
| 661 | 664 | if (!long_double_is_f128) { |
| 662 | 665 | @panic("TODO implement this"); |
| 663 | 666 | } |
| 664 | | return math.fma(c_longdouble, a, b, c); |
| 667 | return math.ceil(x); |
| 668 | } |
| 669 | |
| 670 | export fn fmaf(a: f32, b: f32, c: f32) f32 { |
| 671 | return math.fma(f32, a, b, c); |
| 665 | 672 | } |
| 666 | 673 | |
| 667 | 674 | export fn fma(a: f64, b: f64, c: f64) f64 { |
| 668 | 675 | return math.fma(f64, a, b, c); |
| 669 | 676 | } |
| 670 | | |
| 671 | | export fn fmaf(a: f32, b: f32, c: f32) f32 { |
| 672 | | return math.fma(f32, a, b, c); |
| 677 | export fn fmal(a: c_longdouble, b: c_longdouble, c: c_longdouble) c_longdouble { |
| 678 | if (!long_double_is_f128) { |
| 679 | @panic("TODO implement this"); |
| 680 | } |
| 681 | return math.fma(c_longdouble, a, b, c); |
| 673 | 682 | } |
| 674 | 683 | |
| 675 | 684 | export fn sin(a: f64) f64 { |