Error in Divide Operator and Mathematical Comparison Block

Hey Guys! I have problems with the divide operator and also the Mathematical Compare Blocks.
First I am showing you my blocks


The if block in centre is used to adjust the size of a canvas according to the image (wallpaper) I want to show in it.
The Screen Size is the division of screen height by the width. E.g. 16:9 = 1.77778
The wallpaper size is the division of wallpaper height by width. E.g 5:8 = 0.625
I used the if block with three conditions:-

  1. If the screen ratio is equal to wallpaper ratio then Both height and width percent are set to Hundred.
  2. If the wallpaper ratio is less than screen ratio (Means wallpaper is short in height and more in width than screen) then the Width is set to 100 and Height is set by a division operation.
  3. If the wallpaper ratio is more than screen ratio (Means wallpaper is more in height and short in width than screen) then the height is set to 100 and width is set by a division operation.
    I used that label just for testing purpose. To show what are the various arguments that will be parsed to the blocks.
    Now the problem is with the 1st compare block and 3rd Division Operator.
    The second one is working fine.

    The problem you can see in the below screenshot.

[The car image is still there because the new image was to be set after adjusting the canvas size. The car image width is 100 because in the first screenshot the width was set to 100%. The height is 100% because it comes before width in the if then block. ]
As you can see on the top, the Screen Size and Wallpaper Size are equal but then also it is parsed in the third condition i.e. the More than comparison
Next problem you can see on the screen. What is the problem with the arguments parsed to division operator? From where did that 0.625 came?