📄 mathtypes.~pas
字号:
{-------------------------------------------------------------------------------
Unit MathTypes
数学类型:本单元定义常用数值算法所涉及的基础类型
-------------------------------------------------------------------------------}
unit MathTypes;
interface
Uses SysUtils;
type
// TFloat is the basic library floating point type. Use single for single
// precision (4 bytes) or double for more demanding, double precision (8 bytes)
TFloat = double;//single;
// Complex numbers, with precision specified in TFloat (Types unit)
TComplex = packed record
Re: TFloat; // Real part
Im: TFloat; // Imaginary part
end;
// 复数数组
TComplexArray = Array of TComplex;
// 实数数组
TFloatArray = Array of TFloat;
// 矩阵
TFloatMatrix = Array of TFloatArray;
// 异常
EMathException = class(Exception);
const
// Zero value
ComplexZero: TComplex = (Re: 0.0; Im: 0.0);
// Single ranges from 1.5 x 10^
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -