From fd912b348ccde6cce3a56d4cc748b10d05ff3edd Mon Sep 17 00:00:00 2001 From: chenyu Date: Wed, 29 Jul 2026 18:45:23 -0400 Subject: [PATCH] generic c0*x x//(c1*c2) for c2>0 ((UPat.var("x") // UPat.cvar("c1")) // UPat.cvar("c2"), lambda x,c1,c2: x//(c1*c2) if c2.vmin>0 else None), # ** lt ** - # c0*x sign(c0)*x < ceil(c1/abs(c0)) ((UPat.cvar("c0")*UPat.var("x", dtype=dtypes.weakint)) 0 and c1.arg > 0 else None), - # c0*x 0 else -x)<-(-c1.arg//abs(c0.arg)) if abs(c0.arg) > 1 else None), # x//d x0, and -> c*d 0 else (x>c.arg*d.arg) if d.arg < 0 else None),