I was trying to determine if 3 points created a right triangle and was using the Pythagorean Theorem when I ran into a massive headache of a problem, which I'll get to in a little bit. The first thing I did was calculate the sidelengths using the following code
A,B,C=Vector3(10,0,0).new,Vector3.new(10,10,0),Vector3.new(0,10,0) --These are just example Vector3's for my problem
local CA=math.sqrt((A.X-C.X)^2+(A.Y-C.Y)^2+(A.Z-C.Z)^2)
local CB=math.sqrt((B.X-C.X)^2+(B.Y-C.Y)^2+(B.Z-C.Z)^2)
local BA=math.sqrt((A.X-B.X)^2+(A.Y-B.Y)^2+(A.Z-B.Z)^2)
Now for some strange reason
print(CB^2+BA^2, CA^2)
print(CB^2+BA^2==CA^2)
prints out
200,200
false
The only explanation I can think of is something with roblox rounding the numbers when displayed but behind the scenes these two numbers are ever so slightly askew due to innacuracies with math.sqrt() or ^2. Is there any way to get around this without losing significant accuracy?

2 comments
Using (num+.01/2)-((num+.000001/2)%.01) to round each number fixes the problem but this feels like an inefficient method, if it's all that can be done then I guess it'll suffice however I would really prefer not to have to do something like that,
Answered your comment