Rotate over time does not work properly

So i have a coroutine where i rotate an object by 90 over 0.5 seconds. The problem that i am encountering is that the result is not that precise. Rotation usually stops at about 85 and never reaches 90. Any idea what makes the code behave like that?

 public float rotationSpeed = 0.5f;
 IEnumerator LeftRotateCoroutine()
   {
       var degreesPerFrame = 90 / rotationSpeed * Time.deltaTime;
       float time = 0.0f;
      while (rotationSpeed >= time)
      {
          time += Time.deltaTime;
          gameObject.transform.Rotate(0, 0, degreesPerFrame );
          yield return null;
      }
  }

Try this:

  public float rotationSpeed = 0.5f;
  IEnumerator LeftRotateCoroutine()
    {
        var degreesPerFrame = 90 / rotationSpeed * Time.deltaTime;
        float rotationVal = 0;
       while (rotationVal  < 90)
       {
           rotationVal += degreesPerFrame;
           gameObject.transform.Rotate(0, 0, degreesPerFrame );
           yield return null;
       }
   }