Commits

Albert Bagautdinov committed bcc1359

Add float_of_frac

  • Participants
  • Parent commits 0f49f68

Comments (0)

Files changed (1)

 		let (equal: frac -> frac -> bool) = fun x y ->
 			if snd x == snd y then fst x = fst y
 			else (fst x * snd y) = (fst y * snd x)
+		let (float_of_frac: frac -> float) = function x ->
+		  float_of_int (fst x) /. float_of_int (snd x)
 	end;;