// CodeGear C++Builder
// Copyright (c) 1995, 2021 by Embarcadero Technologies, Inc.
// All rights reserved

// (DO NOT EDIT: machine generated header) 'ABSDecimalRounding.pas' rev: 35.00 (Windows)

#ifndef AbsdecimalroundingHPP
#define AbsdecimalroundingHPP

#pragma delphiheader begin
#pragma option push
#pragma option -w-      // All warnings off
#pragma option -Vx      // Zero-length empty class member 
#pragma pack(push,8)
#include <System.hpp>
#include <SysInit.hpp>
#include <System.Classes.hpp>

//-- user supplied -----------------------------------------------------------

namespace Absdecimalrounding
{
//-- forward type declarations -----------------------------------------------
//-- type declarations -------------------------------------------------------
enum DECLSPEC_DENUM tDecimalRoundingCtrl : unsigned char { drNone, drHalfEven, drHalfPos, drHalfNeg, drHalfDown, drHalfUp, drRndNeg, drRndPos, drRndDown, drRndUp };

struct DECLSPEC_DRECORD Absdecimalrounding__1
{
public:
	System::AnsiString Abbr;
	System::AnsiString Dscr;
};


typedef System::StaticArray<Absdecimalrounding__1, 10> Absdecimalrounding__2;

//-- var, const, procedure ---------------------------------------------------
static const System::Extended SglEps = 1.192093E-07;
static const System::Extended DblEps = 2.220446E-16;
static const System::Extended ExtEps = 1.084202E-19;
static const System::Extended KnownErrorLimit = 1.234375E+00;
static const System::Int8 SafetyFactor = System::Int8(0x2);
static const System::Extended MaxRelErrSgl = 2.942979E-07;
static const System::Extended MaxRelErrDbl = 5.481726E-16;
static const System::Extended MaxRelErrExt = 2.676624E-19;
extern DELPHI_PACKAGE Absdecimalrounding__2 DecimalRoundingCtrlStrs;
static const System::Int8 IM = System::Int8(0x1);
static const System::Int8 DM = System::Int8(0x2);
static const System::Int8 ZM = System::Int8(0x4);
static const System::Int8 OM = System::Int8(0x8);
static const System::Int8 UM = System::Int8(0x10);
static const System::Int8 PM = System::Int8(0x20);
static const System::Int8 IntrM = System::Int8(0x3f);
static const System::Word PC = System::Word(0x300);
static const System::Word RC = System::Word(0xc00);
static const System::Int8 pcSingle = System::Int8(0x0);
static const System::Word pcDouble = System::Word(0x200);
static const System::Word pcExtended = System::Word(0x300);
static const System::Int8 rcBankers = System::Int8(0x0);
static const System::Word rcFloor = System::Word(0x400);
static const System::Word rcCeil = System::Word(0x800);
static const System::Word rcChop = System::Word(0xc00);
extern DELPHI_PACKAGE System::Extended __fastcall DecimalRound(System::Extended Value, int NDFD, double MaxRelErr, tDecimalRoundingCtrl Ctrl = (tDecimalRoundingCtrl)(0x1));
extern DELPHI_PACKAGE System::Extended __fastcall DecimalRoundSgl(float Value, int NDFD, tDecimalRoundingCtrl Ctrl = (tDecimalRoundingCtrl)(0x1));
extern DELPHI_PACKAGE System::Extended __fastcall DecimalRoundDbl(double Value, int NDFD, tDecimalRoundingCtrl Ctrl = (tDecimalRoundingCtrl)(0x1));
extern DELPHI_PACKAGE System::Extended __fastcall DecimalRoundExt(System::Extended Value, int NDFD, tDecimalRoundingCtrl Ctrl = (tDecimalRoundingCtrl)(0x1));
extern DELPHI_PACKAGE void __fastcall CalcEpsValues(double &SglEps, double &DblEps, double &ExtEps);
extern DELPHI_PACKAGE bool __fastcall IsNAN(const float sgl)/* overload */;
extern DELPHI_PACKAGE bool __fastcall IsNAN(const double dbl)/* overload */;
extern DELPHI_PACKAGE bool __fastcall IsNAN(const System::Extended ext)/* overload */;
extern DELPHI_PACKAGE System::Word __fastcall GetX87CW(void);
extern DELPHI_PACKAGE bool __fastcall IsFpuCwOkForRounding(void);
extern DELPHI_PACKAGE void __fastcall LoadDecimalRoundingCtrlAbbrs(System::Classes::TStrings* const Strings);
}	/* namespace Absdecimalrounding */
#if !defined(DELPHIHEADER_NO_IMPLICIT_NAMESPACE_USE) && !defined(NO_USING_NAMESPACE_ABSDECIMALROUNDING)
using namespace Absdecimalrounding;
#endif
#pragma pack(pop)
#pragma option pop

#pragma delphiheader end.
//-- end unit ----------------------------------------------------------------
#endif	// AbsdecimalroundingHPP
