@@ -342,6 +342,22 @@ def floats(
342342 check_valid_bound (min_value , "min_value" )
343343 check_valid_bound (max_value , "max_value" )
344344
345+ if allow_subnormal and next_up (0.0 , width = width ) == 0 : # pragma: no cover
346+ # Not worth having separate CI envs and dependencies just to cover this branch;
347+ # discussion in https://github.com/HypothesisWorks/hypothesis/issues/3092
348+ #
349+ # Erroring out here ensures that the database contents are interpreted
350+ # consistently - which matters for such a foundational strategy, even if it's
351+ # not always true for all user-composed strategies further up the stack.
352+ raise FloatingPointError (
353+ f"Got allow_subnormal={ allow_subnormal !r} , but we can't represent "
354+ f"subnormal floats right now, in violation of the IEEE-754 floating-point "
355+ f"specification. This is usually because something was compiled with "
356+ f"-ffast-math or a similar option, which sets global processor state. "
357+ f"See https://simonbyrne.github.io/notes/fastmath/ for a more detailed "
358+ f"writeup - and good luck!"
359+ )
360+
345361 min_arg , max_arg = min_value , max_value
346362 if min_value is not None :
347363 min_value = float_of (min_value , width )
0 commit comments