Single float compare

I need simple difference between 1 float if it’s possible, maybe it’s easy to do, but my math isn’t that great to figurate this out, i need help please !

Expl. if float is (250) and if it gets random by numbber - or +, in this case let’s say (-50) that will be equal 200, but all i need is my BP to count how much randomed number is far away from 250. In This case will be (-50)

one more Expl. Deep inside what i exactly need

  1. Main Float (340) Random - or + (+38)
    = (Difference i need) (+38)
  2. Second tick : Main Float (378)
    Random - or + (+2) = (Difference i
    need) = (+40)
  3. Third Tick : Main
    Float (380) Random - or + (-100) =
    (Difference i need) = (-60)

i think i explain you exactly what i need !

try using two float variables 1. the main float 2. the randomized one
and then u will only need to do is 2-1…