fun test1d(x: Double, y: Double): Boolean { return x.equals(other = y) } fun test1f(x: Float, y: Float): Boolean { return x.equals(other = y) } fun Float.test1fr(x: Float): Boolean { return .equals(other = x) } fun test2d(x: Double, y: Double?): Boolean { return x.equals(other = y) } fun test2f(x: Float, y: Float?): Boolean { return x.equals(other = y) } fun Float.test2fr(x: Float?): Boolean { return .equals(other = x) } fun test3d(x: Double, y: Any): Boolean { return x.equals(other = y) } fun test3f(x: Float, y: Any): Boolean { return x.equals(other = y) } fun Float.test3fr(x: Any): Boolean { return .equals(other = x) } fun test4d(x: Double, y: Number): Boolean { return x.equals(other = y) } fun test4f(x: Float, y: Number): Boolean { return x.equals(other = y) } fun Float.test4fr(x: Number): Boolean { return .equals(other = x) } fun test5d(x: Double, y: Any): Boolean { return when { y is Double -> x.equals(other = y) else -> false } } fun test5f(x: Float, y: Any): Boolean { return when { y is Float -> x.equals(other = y) else -> false } } fun Float.test5fr(x: Any): Boolean { return when { x is Float -> .equals(other = x) else -> false } } fun test6d(x: Any, y: Any): Boolean { return when { when { x is Double -> y is Double else -> false } -> x.equals(other = y) else -> false } } fun test6f(x: Any, y: Any): Boolean { return when { when { x is Float -> y is Float else -> false } -> x.equals(other = y) else -> false } } fun Float.test6fr(x: Any): Boolean { return when { x is Double -> .equals(other = x) else -> false } } fun testDF(x: Any, y: Any): Boolean { return when { when { x is Double -> y is Float else -> false } -> x.equals(other = y) else -> false } } fun testFD(x: Any, y: Any): Boolean { return when { when { x is Float -> y is Double else -> false } -> x.equals(other = y) else -> false } }