Fix strong mode issue in math_patch.dart.
Fix strong mode issue in math_patch.dart.

In the implementations of min and max, when a and b are doubles and a
== 0.0, we have special case logic to return `(a + b) * a * b` and `a
+ b`, respectively.  These expressions both have type `double`,
whereas the return type is required to be `T`, and the type system
can't guarantee that `double` is assignable to `T`, because all that
is known is that `T` extends `num`.

(Note: a human reader can see that since a and b are doubles, and a
and b have static type `T`, it follows that double must be a subtype
of `T`.  But the type system doesn't have the ability to reach this
conclusion).

To work around this issue we assign to a temporary variable of type
`num`.  Since `T` extends `num`, it is safe to return the temporary
variable.

Fixes #31162

Change-Id: I7eeea43384ce134f3b44d266af908a87f8e0e36a
Reviewed-on: https://dart-review.googlesource.com/18515
Commit-Queue: Paul Berry <72d414e3a99fb120308437779d51667bcc0984eb@google.com>
Reviewed-by: Vyacheslav Egorov <72c81f38df725d8f1832acb9b5bb99563fc2f1b9@google.com>

dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk,dartino/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-lang/sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dartino/dart-sdk,dartino/dart-sdk,dart-lang/sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-archive/dart-sdk,dart-lang/sdk,dart-lang/sdk