diff --git a/compiler/gen/tests/gen_num.rs b/compiler/gen/tests/gen_num.rs index ffe203c30e..be3a86d3ff 100644 --- a/compiler/gen/tests/gen_num.rs +++ b/compiler/gen/tests/gen_num.rs @@ -686,11 +686,19 @@ mod gen_num { assert_evals_to!("Num.powInt 2 3", 8, i64); } + // For some reason, libm's atan has slightly different results on macos vs non-macos #[test] - fn atan() { + #[cfg(target_os = "macos")] + fn atan_macos() { assert_evals_to!("Num.atan 10", 1.4711276743037345, f64); } + #[test] + #[cfg(not(target_os = "macos"))] + fn atan() { + assert_evals_to!("Num.atan 10", 1.4711276743037347, f64); + } + // #[test] // #[should_panic(expected = r#"Roc failed with message: "integer addition overflowed!"#)] // fn int_overflow() {