From c91dc620c01bebd79fc750b97bb51cc517bbfee4 Mon Sep 17 00:00:00 2001 From: Chris Elrod Date: Mon, 1 Apr 2024 13:09:05 -0400 Subject: [PATCH 1/2] `throw_overflowerr_negation` takes 1 argument --- src/quirks.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quirks.jl b/src/quirks.jl index 65ebc7b..b5c8571 100644 --- a/src/quirks.jl +++ b/src/quirks.jl @@ -25,7 +25,7 @@ end # checked.jl @device_override @noinline Base.Checked.throw_overflowerr_binaryop(op, x, y) = @print_and_throw c"Binary operation overflowed" -@device_override @noinline Base.Checked.throw_overflowerr_negation(op, x, y) = +@device_override @noinline Base.Checked.throw_overflowerr_negation(x) = @print_and_throw c"Negation overflowed" @device_override function Base.Checked.checked_abs(x::Base.Checked.SignedInt) r = ifelse(x < 0, -x, x) From 4c073c425a5408bd4f8618c13feb5571c52504f4 Mon Sep 17 00:00:00 2001 From: Chris Elrod Date: Mon, 1 Apr 2024 14:57:41 -0400 Subject: [PATCH 2/2] Similar update for `exp_domainerror` --- src/quirks.jl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/quirks.jl b/src/quirks.jl index b5c8571..f279d94 100644 --- a/src/quirks.jl +++ b/src/quirks.jl @@ -9,7 +9,7 @@ end # math.jl @device_override @noinline Base.Math.throw_complex_domainerror(f::Symbol, x) = @print_and_throw c"This operation requires a complex input to return a complex result" -@device_override @noinline Base.Math.throw_exp_domainerror(f::Symbol, x) = +@device_override @noinline Base.Math.throw_exp_domainerror(x) = @print_and_throw c"Exponentiation yielding a complex result requires a complex argument" # intfuncs.jl