About the author
The Delphi 8 compiler introduces the FINITEFLOAT directive.
Remarks
The $FINITEFLOAT directive controls the raising of exceptions and the results of floating point calculations when over/underflow occurs.
In the {$FINITEFLOAT OFF} state, floating point calculations return NaN, -INF or +INF.
In the {$FINITEFLOAT ON} state, which is the default, floating point calculations causes the compiler to emit extra code to check the results of the floating point calculations, and when the range checks fail, causes an exception to occur. These extra checks take time, so, to provide a performance boost, consider using {$FINITEFLOAT OFF}.
Quiz
In reference to the following program, consider separately, what happens in each case if
{$APPTYPE CONSOLE}uses SysUtils;var x, y, z: Double;begin try x := 1; y := 0; z := x / y; WriteLn(z); except on E: Exception do WriteLn(E.Message); end;end.
A method to design records so that they're allocated on a specific byte boundary, such as 16 bytes, 512 bytes, 4096 bytes, etc.