Skip to content

Commit

Permalink
Revert "Fallbacks for Perl_fp_class_denorm()."
Browse files Browse the repository at this point in the history
This reverts commit e77299d.

This was reverted due to a major freeze. It was merged into the
blead-next branch and will appear in 5.26.1.
  • Loading branch information
xsawyerx committed May 30, 2017
1 parent e77299d commit 2749d03
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions perl.h
Expand Up @@ -6867,26 +6867,6 @@ extern void moncontrol(int);
# endif
#endif

/* We have somehow managed not to define the denormal/subnormal
* detection.
*
* This may happen if the compiler doesn't expose the C99 math like
* the fpclassify() without some special switches. Perl tries to
* stay C89, so for example -std=c99 is not an option.
*
* The Perl_isinf() and Perl_isnan() should have been defined even if
* the C99 isinf() and isnan() are unavailable, and the NV_MIN becomes
* from the C89 DBL_MIN or moral equivalent. */
#if !defined(Perl_fp_class_denorm) && defined(Perl_isinf) && defined(Perl_isnan) && defined(NV_MIN)
# define Perl_fp_class_denorm(x) ((x) != 0.0 && !Perl_isinf(x) && !Perl_isnan(x) && PERL_ABS(x) < NV_MIN)
#endif

/* This is not a great fallback: subnormals tests will fail,
* but at least Perl will link and 99.999% of tests will work. */
#if !defined(Perl_fp_class_denorm)
# define Perl_fp_class_denorm(x) FALSE
#endif

#ifdef DOUBLE_IS_IEEE_FORMAT
# define DOUBLE_HAS_INF
# define DOUBLE_HAS_NAN
Expand Down

0 comments on commit 2749d03

Please sign in to comment.