`Number`

is an open-ended (non-sealed) class. You cannot know all the number implementation in advance, and so it is impossible to write a correct open-ended implementation of operators on arbitrary numbers. However, for your particular application you should have some knowledge on what particular number implementations you care about and you can implement your own operation for your needs, for example, writing something like this:

```
operator fun Number.times(y: Number): Number = when (this) {
is Int -> this * y.toInt()
is Double -> this * y.toDouble()
is Float -> this * y.toFloat()
else -> error("unsupported")
}
```

It will not make your original code work (because, again, it is impossible to require that any two arbitrary numbers can be multiplied in a sensible way), but it is as close as it gets.