How to format a number in scientific notation
06:12 05 Sep 2020

So basically I have this function which returns: 3.00000000000E000

function lang():extended;
begin
wynik := 0 ;
   counter := 1;
   temp :=1;
   input := 2;


   for i:= 1 to 4 do
       begin
       for k:= 1 to 4 do
       begin
       if i = k then counter := counter
       else temp := temp * ((input - a[k]) / (a[i] - a[k]));



       end;
       wynik := wynik + temp*f[i];

       temp := 1;
      end;
      Result := wynik;

end;

But when I try to print it on the application screen using FloatToStr, I get only '3'.

procedure TFormCalculator.Button1Click(Sender: TObject);
begin
     Edit1.Text := FloatToStr(lang());
end;

How can I keep the long version of the result?

delphi number-formatting freepascal lazarus scientific-notation