I am using a Cantor pairing function that takes two real number output unique real number.
def cantor_paring(a,b):
return (1/2)*(a+b)*(a+b+1) + b
This work good for me when the input pair number are small.
cantor_paring(3,5)
41.0
However, when the input pair number is big the output becomes very huge.
cantor_paring(195149767,9877)
1.9043643420693068e+16
Now question I have is, is there a way to tweak the pair function so that output is relatively small even for big input numbers.