mathu.inc 1.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. {
  2. This file is part of the Free Pascal run time library.
  3. Copyright (c) 2004 by Florian Klaempfl
  4. member of the Free Pascal development team
  5. See the file COPYING.FPC, included in this distribution,
  6. for details about the copyright.
  7. This program is distributed in the hope that it will be useful,
  8. but WITHOUT ANY WARRANTY; without even the implied warranty of
  9. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
  10. **********************************************************************}
  11. function GetRoundMode: TFPURoundingMode;
  12. begin
  13. Result:=softfloat_rounding_mode;
  14. end;
  15. function SetRoundMode(const RoundMode: TFPURoundingMode): TFPURoundingMode;
  16. begin
  17. SetRoundMode:=softfloat_rounding_mode;
  18. softfloat_rounding_mode:=RoundMode;
  19. end;
  20. function GetPrecisionMode: TFPUPrecisionMode;
  21. begin
  22. result := pmSingle;
  23. end;
  24. function SetPrecisionMode(const Precision: TFPUPrecisionMode): TFPUPrecisionMode;
  25. begin
  26. { nothing to do, not supported }
  27. result := pmSingle;
  28. end;
  29. function GetExceptionMask: TFPUExceptionMask;
  30. begin
  31. Result:=softfloat_exception_mask
  32. end;
  33. function SetExceptionMask(const Mask: TFPUExceptionMask): TFPUExceptionMask;
  34. begin
  35. softfloat_exception_mask:=Mask;
  36. end;
  37. procedure ClearExceptions(RaisePending: Boolean = true);
  38. begin
  39. softfloat_exception_flags:=[];
  40. end;