Q:

Getting Wrong Subtraction Results for Single DataType VB.NET

Dim StartXRatioBetween2Lines As Single = Math.Max(l1StartAt.x, l2StartAt.x) - Math.Min(l1StartAt.x, l2StartAt.x)
StartXRatioBetween2Lines is returning me a wrong results, both l1StartAt.x and l2StartAt.x are of a Single data type
Here are the values for my Xs:
l1StartAt.x is 219.89958190917969
l2StartAt.x is 219.89959716796875
StartXRatioBetween2Lines is returning me 1.52587891E-05
Shouldn't I be seeing value less than 0.1 for StartXRatioBetween2Lines?

A:

The "E-05" at the end of that number is saying that your number is being multiplied by 10^(-5), similar to the notation on a scientific/graphing calculator. Your number is much less than 0.1, it isn't wrong.
Here's another question about the subject that explains why the "E" is used in place of the "10^": https://math.stackexchange.com/questions/6273/what-does-e-mean-in-9-0122222900391e-5

