mathu.inc 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657
  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. softfloat_rounding_mode:=RoundMode;
  18. end;
  19. function GetPrecisionMode: TFPUPrecisionMode;
  20. begin
  21. result := pmSingle;
  22. end;
  23. function SetPrecisionMode(const Precision: TFPUPrecisionMode): TFPUPrecisionMode;
  24. begin
  25. { nothing to do, not supported }
  26. result := pmSingle;
  27. end;
  28. function GetExceptionMask: TFPUExceptionMask;
  29. begin
  30. Result:=softfloat_exception_mask
  31. end;
  32. function SetExceptionMask(const Mask: TFPUExceptionMask): TFPUExceptionMask;
  33. begin
  34. softfloat_exception_mask:=Mask;
  35. end;
  36. procedure ClearExceptions(RaisePending: Boolean = true);
  37. begin
  38. softfloat_exception_flags:=[];
  39. end;