We have a program:
var a, b: real; function dg0(a, b : real) : real; var dg : real; f, r : longint; begin r := 1; repeat a := a * b; f := trunc(a); dg := dg + f * r; until a - trunc(a) = 0; writeln(dg); dg0 := dg; end; begin readln(a, b); writeln(dg0(a, b)); writeln('Нажмите Enter для выхода из программы'); readln; end. It must convert the decimal part of the decimal number а to the number system with the base b (input of a number in the format 0.111). On the 12th line ( f := trunc(a); ) gives the error:
Pattern.pas (12): Runtime Error: The value was unacceptably small or unacceptably large for Int32.
Please explain what the error is