title: "Floating point overflow" error in Delphi code
body: <p>I have this source code in Delphi, why I get this error <strong><em>"Floating point overflow."</em></strong> when I run the code? and how to correct it?</p>
  
  <p><strong><em>The error message:</em></strong></p>
  
  <p><a href="https://i.stack.imgur.com/S6Im7.jpg" rel="nofollow"><img src="https://i.stack.imgur.com/S6Im7.jpg" alt="enter image description here"></a></p>
  
  <p><strong><em>The code:</em></strong></p>
  
  <pre><code>procedure TForm1.Button1Click(Sender: TObject);
   var n, d, i, j, maxiter , iter: Integer;
   Lower,Upper : Double;
   X, V : TArray&lt;TArray&lt;Double&gt;&gt;;
   begin
    Lower := 0;
    Upper := 0.2;
    n := 100;
    d := 55;
    SetLength(V, n, d);
    SetLength(X, n, d);
    maxiter := 2000;
    iter := 1;
  
    for i:= 0 n-1 do
      for j:=0 to d-1 do
       begin
        X[i][j]:= Lower + (Upper - Lower) * Random;
        V[i][j] := 0.1 * X[i][j];
       end;
  
   while (iter &lt;= maxiter) do
    begin
     for  i:= 0 to n-1 do
       for j:= 0 to D-1 do
         V[i][j]:= 5 * V[i][j] + 2.0 * Random;
  
     iter := iter +1;
    end;
  
  end;
  </code></pre>