Different Type mathematics - Easy!

One of the most common problems with other languages.

Pascal is a STRICT type language

None of this Dyanamic data types, we don't guess - you define! Working perfectly since 1968.

Just include the MATH unit, you're done

Modern Pascal includes one of the most robust mathematics libraries available to a PASCAL compiler.

8bit, 32bit, 64bit and even 80bit

Modern Pascal supports 80bit exponential data types with or without FPU emulation. 15 Position Precision.

Program MathDiffTypes.v1180807; Uses Math, Display; Var W:Word; E:Extended; L:Longint; Begin TextColor(10); TextBackground(0); ClrScr; W:=100; E:=35.331; // L:=W+E; produces: Compilation error: Cannot assign "Extended" to "Int32" at line 18 L:=Trunc(W+E); Writeln('Addition ',W+E,' ',L); L:=Trunc(W-E); Writeln('Subtraction ',W-E,' ',L); L:=Trunc(W*E); Writeln('Multiplication ',W*E,' ',L); L:=Trunc(W/E); Writeln('Division ',W/E,' ',L); TextColor(14); L:=Trunc(W/E); Writeln('Remainder ',(W/E)-L,' ',L); Writeln('Remainder ',Frac(W/E),' ',L); Writeln('Whole Number ',Int(W/E),' ',L); Writeln('Round ',Round(W/E),' ',L); Writeln('Logarithm ',Ln(W/E),' ',L); Writeln('Exponential ',Exp(W/E),' ',L); Writeln('Power ',Power(W/E,Round(W/E)),' ',L); Writeln('Power of 2 ',Power(W/E,2),' ',L); TextColor(7); End.

Output from code above...