feat: add floats

This commit is contained in:
2026-04-22 22:21:26 +02:00
parent c2fc11bbeb
commit e66a4ee736
14 changed files with 471 additions and 66 deletions
+20
View File
@@ -0,0 +1,20 @@
[code]
fn test_f64(x: f64, y: f64) -> f64 {
let z: f64 = 2.5;
// (7.0 - 2.0) / 2.5 + (7.0 * 2.0) = 5.0 / 2.5 + 14.0 = 2.0 + 14.0 = 16.0
return (x - y) / z + (x * y);
}
[harness]
extern double test_f64(double x, double y);
int main() {
double result = test_f64(7.0, 2.0);
if (result == 16.0) {
return 0;
}
return 1;
}
[expected_return_code]
0