After change made for 0024589, no handler is set for floating point exceptions in DRAW. Thus there is no more control for invalid floating point operations in tests, and bugs like division by zero can remain unnoticed.

It is proposed to restore handling of FPE signals in DRAW for MSVC and GCC compilers. Intel and CLang compilers are known to cause troubles with FPE handling (see 0023802, 0024254, 0024589) and for these compilers FPE should still be kept disabled.

> It is proposed to restore handling of FPE signals in DRAW for MSVC and GCC compilers.
> Intel and CLang compilers are known to cause troubles with FPE handling
> (see 0023802, 0024254, 0024589)
> and for these compilers FPE should still be kept disabled.
Notice that enabling this option ON by default will cause problems on Intel and software OpenGL implementations. Thus this should be further discussed (e.g. use environment variable instead of hard-coded value) after all regression will be fixed.

For current master offset algorithm is stopped after short time because of exeptions without result. Now algorithm is really working, but produces wrong result, because input shapes are not suitable for offset with option "intersect". It is better to remove these tests at all.

A number of changes in the code have been done in order to fix floating point exceptions that became generated after enabling signals:

- Maximal value of argument of Sinh and Cosh is restricted by 0.71047586007394394e+03 in order to avoid FP overflow in Standard_Real.cxx. The functions Sinh and Cosh are made non-inline. Sinh and Cosh have become used instead of sinh and cosh in ElCLib.cxx.

- Maximal value of parameter on hyperbola is restricted by 23 in order to avoid FP overflow in Extrema_GenExtCS.cxx, ShapeFix_EdgeProjAux.cxx.

- Interface of the root curve adaptor class Adaptor3d_Curve has been updated to add new virtual methods BasisCurve and OffsetValue. They complement the adaptor for the case of offset curves. They allow setting the correct limitation of domain search in the case of offset of hyperbola, in order to get rid of floating point overflow (see Extrema_GenExtCS.cxx). All classes inheriting Adaptor3d_Curve have been changed to implement the new virtual methods.

The new branch CR26329_4 has the following changes:
- The changes in the file GeomLib_CheckCurveOnSurface.cxx have been gone, as they are not relevant to this bug.
- Files with changes only in formatting have been reverted.
- The commit message contains description of all changes.

As the content was changed I think the branch must be re-tested again.

A number of changes in the code have been done in order to fix floating point exceptions that became generated after enabling signals:

- Maximal value of argument of Sinh and Cosh is restricted by 0.71047586007394394e+03 in order to avoid FP overflow in Standard_Real.cxx. If the argument exceeds this value exception Standard_NumericError is raised. The functions Sinh and Cosh are made non-inline. Sinh and Cosh have become used instead of sinh and cosh in ElCLib.cxx.

- Maximal value of parameter on hyperbola is restricted by 23 in order to avoid FP overflow in Extrema_GenExtCS.cxx, ShapeFix_EdgeProjAux.cxx.

- Interface of the root curve adaptor class Adaptor3d_Curve has been updated to add new virtual methods BasisCurve and OffsetValue. They complement the adaptor for the case of offset curves. They allow setting the correct limitation of domain search in the case of offset of hyperbola, in order to get rid of floating point overflow (see Extrema_GenExtCS.cxx). All classes inheriting Adaptor3d_Curve have been changed to implement the new virtual methods.

Added DRAW command dsetsignal, resetting OSD signal handler with either armed or disabled FPE handler, according to an option.
If called without arguments, it sets FPE handler only if environment variable OSD_FPE is defined (with value different from 0).
On start, DRAW calls dsetsignal to set FPE signal if CSF_FPE is defined.
Test bugs fclasses bug6143 uses dsetsignal to set FPE handler unconditionally before the test command, and resets it to default at the end.

A number of changes in the code have been done in order to fix floating point exceptions that became generated after enabling signals:

- Global functions Sinh() and Cosh() defined in Standard_Real.hxx are improved to raise Standard_NumericError exception if argument is too big (greater than 710.47586), instead of relying on system treatment of floating point overflow. These functions are used instead of sinh and cosh in ElCLib.cxx.

- Maximal value of parameter on hyperbola is restricted by 23 (corresponding to ~1e10 in 3d) in order to avoid FP overflow in Extrema_GenExtCS.cxx, ShapeFix_EdgeProjAux.cxx.

- Interface of the root curve adaptor class Adaptor3d_Curve has been updated to add new virtual methods BasisCurve and OffsetValue. They complement the adaptor for the case of offset curves. These methods are used in Extrema_GenExtCS.cxx to restrict domain search in the case of offset of hyperbola, in order to get rid of floating point overflow. All classes inheriting Adaptor3d_Curve have been changed to implement the new virtual methods.

Apart of some simplifications, and rolling back some changes that seem to have no effect (in Intf_InterferencePolygonPolyhedron.gxx, ProjLib_ComputeApproxOnPolarSurface.cxx,
ShapeConstruct_ProjectCurveOnSurface.cxx), essential change is that FPE signals are not enabled by default on any platform. The reason is that even for FPE-aware compiler, depending on environment, it can be dangerous to enable FPE signals. The known cases are using Mesa as OpenGl driver, and using remote desktop on Windows: in both cases graphic driver will very likely generate FPE even on good input data.

In order to enable FPE handling, either command "dsetsignal 1" should be called in DRAW, or environment variable "CSF_FPE" set to 1.

When testing, please test both with and without CSF_FPE set.

In the future, testing with CSF_FPE set should be included in regular certification procedures, at least before release.

Added DRAW command dsetsignal, resetting OSD signal handler with either armed or disabled FPE handler, according to an option.
If called without arguments, it sets FPE handler only if environment variable OSD_FPE is defined (with value different from 0).
On start, DRAW calls dsetsignal to set FPE signal if CSF_FPE is defined.
Test bugs fclasses bug6143 uses dsetsignal to set FPE handler unconditionally before the test command, and resets it to default at the end.

A number of changes in the code have been done in order to fix floating point exceptions that became generated after enabling signals:

- Global functions Sinh() and Cosh() defined in Standard_Real.hxx are improved to raise Standard_NumericError exception if argument is too big (greater than 710.47586), instead of relying on system treatment of floating point overflow. These functions are used instead of sinh and cosh in ElCLib.cxx.

- Maximal value of parameter on hyperbola is restricted by 23 (corresponding to ~1e10 in 3d) in order to avoid FP overflow in Extrema_GenExtCS.cxx, ShapeFix_EdgeProjAux.cxx.

- Interface of the root curve adaptor class Adaptor3d_Curve has been updated to add new virtual methods BasisCurve and OffsetValue. They complement the adaptor for the case of offset curves. These methods are used in Extrema_GenExtCS.cxx to restrict domain search in the case of offset of hyperbola, in order to get rid of floating point overflow. All classes inheriting Adaptor3d_Curve have been changed to implement the new virtual methods.

I have fixed regression on bugs vis bug24837_1 -- these were effects of 0027772. However, additional regression appeared in the mean time in master -- see new issue 0027891.

Test offset with_intersect_20 J9 is also a regression; I have reverted a change that allowed it to be unnoticed, and registered a new issue to deal with it, 0027892.

Please test branch CR27713_1 (which is built on top of CR26329_7) with corresponding branch CR26329_* in Products in default mode (without CSF_FPE), and integrate if these tests pass. The problems appearing with CSF_FPE should be fixed separately later.

Added DRAW command dsetsignal, resetting OSD signal handler with either armed or disabled FPE handler, according to an option.
If called without arguments, it sets FPE handler only if environment variable OSD_FPE is defined (with value different from 0).
On start, DRAW calls dsetsignal to set FPE signal if CSF_FPE is defined.
Test bugs fclasses bug6143 uses dsetsignal to set FPE handler unconditionally before the test command, and resets it to default at the end.

A number of changes in the code have been done in order to fix floating point exceptions that became generated after enabling signals:

- Global functions Sinh() and Cosh() defined in Standard_Real.hxx are improved to raise Standard_NumericError exception if argument is too big (greater than 710.47586), instead of relying on system treatment of floating point overflow. These functions are used instead of sinh and cosh in ElCLib.cxx.

- Maximal value of parameter on hyperbola is restricted by 23 (corresponding to ~1e10 in 3d) in order to avoid FP overflow in Extrema_GenExtCS.cxx, ShapeFix_EdgeProjAux.cxx.

- Interface of the root curve adaptor class Adaptor3d_Curve has been updated to add new virtual methods BasisCurve and OffsetValue. They complement the adaptor for the case of offset curves. These methods are used in Extrema_GenExtCS.cxx to restrict domain search in the case of offset of hyperbola, in order to get rid of floating point overflow. All classes inheriting Adaptor3d_Curve have been changed to implement the new virtual methods.