The float equivalent of self

assert 5.to_f         == 5.0
assert 5.to_f         != 5

Property definitions

core $ Numeric :: to_f
	# The float equivalent of `self`
	#
	#     assert 5.to_f         == 5.0
	#     assert 5.to_f         != 5 # Float and Int are not equals
	fun to_f: Float is abstract
lib/core/kernel.nit:461,2--465,28

core $ UInt32 :: to_f
	redef fun to_f is intern
lib/core/fixed_ints.nit:637,2--25

core $ Int8 :: to_f
	redef fun to_f is intern
lib/core/fixed_ints.nit:153,2--25

core $ Int16 :: to_f
	redef fun to_f is intern
lib/core/fixed_ints.nit:274,2--25

core $ UInt16 :: to_f
	redef fun to_f is intern
lib/core/fixed_ints.nit:395,2--25

core $ Int32 :: to_f
	redef fun to_f is intern
lib/core/fixed_ints.nit:516,2--25

gmp $ Ratio :: to_f
    #     assert(3.to_r.to_f == 3.0)
    redef fun to_f do return val.get_d
lib/gmp/gmp.nit:378,5--379,38

core $ Byte :: to_f
	redef fun to_f is intern
lib/core/kernel.nit:655,2--25

core $ Float :: to_f
	redef fun to_f do return self
lib/core/kernel.nit:541,2--30

gmp $ BigInt :: to_f
    #     assert(11.to_bi.to_f == 11.0)
    redef fun to_f do return val.get_d
lib/gmp/gmp.nit:263,5--264,38

core $ Int :: to_f
	redef fun to_f is intern
lib/core/kernel.nit:752,2--25