Extended Real Types
 

program Extended_Real_Types;

(* Note: If you are using TURBO Pascal Version 5.0 or newer *)
(* and you do not have a Math Co_Processor, you can *)
(* still compile and run this program by using the *)
(* compiler directive as explained in the User's Guide. *)

var Number : real;
Small_Number : single;
Big_Number : double;
Huge_Number : extended;
Whole_Number : comp;

begin
Number := 100000000000000000000000000.0;
Small_Number := 100000000000000000000000000.0;
Big_Number := 100000000000000000000000000.0;
Huge_Number := 100000000000000000000000000.0;
Whole_Number := 1000000000000000000.0;

Writeln('Number = ',Number :40:3);
Writeln('Small_Number = ',Small_Number:40:3);
Writeln('Big_Number = ',Big_Number :40:3);
Writeln('Huge_Number = ',Huge_Number :40:3);
Writeln('Whole_Number = ',Whole_Number:40:3);
end.



Result of execution

Number = 99999999999985900100000000.000
Small_Number = 100000002537764290000000000.000
Big_Number = 100000000000000005000000000.000
Huge_Number = 100000000000000000000000000.000
Whole_Number = 1000000000000000000.000

(c) Shilpa Sayura Foundation 2006-2017