Problem with clockwise and anti-clockwise from code C#

This code is not working. It continue adding also after 1.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;

public class LoadingMain : MonoBehaviour {

    public GameObject loader;

    float num = 0;
    bool trump = false;

    void Update()
    {
        Debug.Log(Time.time);
        Debug.Log("numero = " + num);
        if (num == 0f)
        {
            Debug.Log("------>numero = 0");
            loader.GetComponent<Image>().fillClockwise = true;
            trump = false;
        }
        else if (num == 1f)
        {
            Debug.Log("------>numero = 1");
            loader.GetComponent<Image>().fillClockwise = false;
            trump = true;
        }

        if (trump) {
            num -= 0.05f;
        } else {
            num += 0.05f;
        }
        loader.GetComponent<Image>().fillAmount = num;
    }
}

Never compare floating point values with a distinct value. It’s almost impossible that you actually reach that exact value. Use this instead:

if (num <= 0f)
{
}
else if (num >= 1f)
{
}

Checking float values for equality is a bad practice. Try checking for num >= 1.0f.