He estado haciendo pruebas con RoundTo y hago algo mal:
El número es 123,456789
-si le pongo g:=RoundTo(f,-3):sale=123,45700073
-si le pongo -2):sale=123,45999964
-si le pongo -1):sale=123,5
-si le pongo 0):sale=123
También me pasa con una función mia:
Código Delphi
[-]procedure TInt_CC.ListBox9Click(Sender: TObject);
var
convertir:smallint;
begin
convertir:=Listbox9.ItemIndex + 1;
Tipo_Inst_P_S:=Tipo_Inst(convertir);
end;
function Tipo_Inst(convertir:integer):single;
begin
if convertir=1 then Tipo_Inst:=1.732;
if convertir=2 then Tipo_Inst:=2;
if convertir=3 then Tipo_Inst:=1.732;
if convertir=4 then Tipo_Inst:=1.732;
end;
Con esta función me devuelve 1,7319999933
en lugar de 1,732.
Gracias