diff --git a/crates/functions/src/math.rs b/crates/functions/src/math.rs index 6d4cdcf58..f6a3b2efa 100644 --- a/crates/functions/src/math.rs +++ b/crates/functions/src/math.rs @@ -694,6 +694,16 @@ pub(crate) fn specs() -> Vec { f!("ROUNDDOWN", 2, 2, MathTrig, S, "ROUNDDOWN(number, num_digits)", "Rounds a number toward zero to a given number of digits.", rounddown), f!("MROUND", 2, 2, MathTrig, S, "MROUND(number, multiple)", "Rounds a number to the nearest multiple.", mround), f!("CEILING", 2, 2, Compatibility, S, "CEILING(number, significance)", "Rounds a number up to a multiple of significance.", ceiling), + f!( + "ECMA.CEILING", + 2, + 2, + Compatibility, + S, + "ECMA.CEILING(number, significance)", + "Rounds a number up to a multiple of significance.", + ceiling + ), f!( "CEILING.MATH", 1, diff --git a/crates/functions/src/math/tests.rs b/crates/functions/src/math/tests.rs index 14f72d1e1..503d4771c 100644 --- a/crates/functions/src/math/tests.rs +++ b/crates/functions/src/math/tests.rs @@ -101,6 +101,11 @@ fn rounding() { close(ev2("CEILING", 1.5, 0.1), 1.5); close(ev2("CEILING", 0.234, 0.01), 0.24); is_err(ev2("CEILING", 2.5, -1.0), Num); + // ECMA.CEILING is CEILING under a second name (Excel table from #2776). + close(ev2("ECMA.CEILING", 1.5, 1.0), 2.0); + close(ev2("ECMA.CEILING", -2.5, -2.0), -4.0); + close(ev2("ECMA.CEILING", 2.5, 0.0), 0.0); + is_err(ev2("ECMA.CEILING", 1.5, -1.0), Num); close(ev2("FLOOR", 3.7, 2.0), 2.0); close(ev2("FLOOR", -2.5, -2.0), -2.0); close(ev2("FLOOR", -2.5, 2.0), -4.0);