times

operator fun times(other: Rational): Rational


operator fun times(scalar: Long): Long

scalar * num / den with a Long intermediate. Multiplies after reducing scalar against den first, so e.g. pts * Rational(1, 1_000_000) stays exact far beyond what naive scalar * num would overflow at. For timestamp conversion between two arbitrary time-bases prefer the native av_rescale_q path (128-bit).

Throws

when the product overflows Long even after reduction