From d30f138cbda76d56f0f51f1ffe82bdbac15d81b9 Mon Sep 17 00:00:00 2001 From: Yiwu Chen <210at85@gmail.com> Date: Thu, 26 Dec 2024 13:16:13 +0000 Subject: [PATCH] [stdlib] Make examples compile in `math` Signed-off-by: Yiwu Chen <210at85@gmail.com> --- stdlib/src/math/math.mojo | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/stdlib/src/math/math.mojo b/stdlib/src/math/math.mojo index 836a0b3c0b..f026752612 100644 --- a/stdlib/src/math/math.mojo +++ b/stdlib/src/math/math.mojo @@ -2588,7 +2588,7 @@ trait CeilDivable: var x: Float64 fn __ceildiv__(self, denominator: Self) -> Self: - return -(self.x // -denominator.x) + return Self(self.x // denominator.x) ``` """ @@ -2621,7 +2621,7 @@ trait CeilDivableRaising: var x: object fn __ceildiv__(self, denominator: Self) raises -> Self: - return -(self.x // -denominator.x) + return Self(self.x // denominator.x) ``` """