How to round a number up to 2-3 decimal places with "pascal.A.B.C" if error?

've made a program to compute the discriminant in pascal ,and so,when calculating x1 and x2, gives the error:runtime Error: Value was either unacceptably low or unacceptably small for an Int32.
I understand that a larger range of numbers and int32 not fit. How to solve it?
July 4th 19 at 23:34
4 answers
July 4th 19 at 23:36
July 4th 19 at 23:38
And why to round intermediate values? Round the final result, or do not increase it, and already output in the desired format.
July 4th 19 at 23:40
The function signature look.
function Round(X: real): longint;
July 4th 19 at 23:42
Usually in the works (and not even in training — it works as Excel) are not rounded, and the output of rounding.

Some advanced tools rounding is that rounding a fractional number to the i-th sign I see.
In addition, you suggested, what kind of Pascal you are dealing with, I uploaded it, and repeated a past mistake — this error occurs exactly because of rounding NaN.

Find more questions by tags DebuggingPascalProgramming