def sinpi(c): "sin(pi*x)." d = fpu.up(lambda: c.sup - c.inf) if d != d or d >= 2.0: return (-1.0, +1.0), inf = fpu.min(crlibm.sinpi_rd(x) for x in c) sup = fpu.max(crlibm.sinpi_ru(x) for x in c) # The derivative of sinpi is pi*cospi. As we are interested in the # derivative sign but not its magnitude, we omit the pi factor. if crlibm.cospi_rd(c.inf) <= 0 <= crlibm.cospi_ru(c.sup): return (-1.0, sup), if crlibm.cospi_ru(c.inf) >= 0 >= crlibm.cospi_rd(c.sup): return (inf, +1.0), if d >= 1.0: return (-1.0, +1.0), return (inf, sup),