@@ -300,13 +300,15 @@ function Base.div(
300300 return div (x, y, RoundDown)
301301end
302302function Base. div (
303- x:: TracedRNumber{<:Reactant.ReactantSInt} , y:: TracedRNumber{<:Reactant.ReactantUInt} ,
303+ x:: TracedRNumber{<:Reactant.ReactantSInt} ,
304+ y:: TracedRNumber{<:Reactant.ReactantUInt} ,
304305 :: typeof (RoundToZero),
305306)
306307 return flipsign (signed (div (unsigned (abs (x)), y)), x)
307308end
308309function Base. div (
309- x:: TracedRNumber{<:Reactant.ReactantSInt} , y:: TracedRNumber{<:Reactant.ReactantUInt} ,
310+ x:: TracedRNumber{<:Reactant.ReactantSInt} ,
311+ y:: TracedRNumber{<:Reactant.ReactantUInt} ,
310312 :: typeof (RoundDown),
311313)
312314 ax = unsigned (abs (x))
@@ -316,7 +318,8 @@ function Base.div(
316318 return ifelse (signbit (x) & has_rem, result - one (result), result)
317319end
318320function Base. div (
319- x:: TracedRNumber{<:Reactant.ReactantSInt} , y:: TracedRNumber{<:Reactant.ReactantUInt} ,
321+ x:: TracedRNumber{<:Reactant.ReactantSInt} ,
322+ y:: TracedRNumber{<:Reactant.ReactantUInt} ,
320323 :: typeof (RoundUp),
321324)
322325 ax = unsigned (abs (x))
@@ -326,7 +329,8 @@ function Base.div(
326329 return ifelse (! signbit (x) & has_rem, result + one (result), result)
327330end
328331function Base. div (
329- x:: TracedRNumber{<:Reactant.ReactantSInt} , y:: TracedRNumber{<:Reactant.ReactantUInt} ,
332+ x:: TracedRNumber{<:Reactant.ReactantSInt} ,
333+ y:: TracedRNumber{<:Reactant.ReactantUInt} ,
330334 :: typeof (RoundFromZero),
331335)
332336 ax = unsigned (abs (x))
0 commit comments