import heapq from itertools import product from itertools import permutations import random import math import bisect import sys from collections import defaultdict from itertools import combinations inf = 1 << 60 def exit(): sys.exit() def LI(): return list(map(int, input().split())) def II(): return int(input()) def SI(): return input() t = II() for _ in range(t): n, m, k = LI() if n*m//2 >= k: print((n*m-1)/(n*m)) else: print((n*m-1)/(n*m)/2)