We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
%
fmodl
1 parent 546a1ea commit 66c2e38Copy full SHA for 66c2e38
library/std/src/f128/tests.rs
@@ -53,7 +53,21 @@ macro_rules! assert_f128_biteq {
53
54
#[test]
55
fn test_num_f128() {
56
- test_num(10f128, 2f128);
+ // FIXME(f16_f128): replace with a `test_num` call once the required `fmodl`/`fmodf128` function is available on all platforms.
57
+ let ten = 10f128;
58
+ let two = 2f128;
59
+ assert_eq!(ten.add(two), ten + two);
60
+ assert_eq!(ten.sub(two), ten - two);
61
+ assert_eq!(ten.mul(two), ten * two);
62
+ assert_eq!(ten.div(two), ten / two);
63
+}
64
+
65
+#[test]
66
+#[cfg(reliable_f128_math)]
67
+fn test_num_f128_rem() {
68
69
70
+ assert_eq!(ten.rem(two), ten % two);
71
}
72
73
0 commit comments