A macro can offer one `fabs(X)` interface while choosing `fabsf`, `fabsl`, or `fabs` according to the type of `X`. This is **generic selection**: a C11 expression that makes a compile-time choice among expressions associated with types. section 18.2
#define fabs(X) \ _Generic((X), \ float: fabsf, \ long double: fabsl, \ default: fabs)(X)
Here, a `float` argument selects `fabsf`, a `long double` selects `fabsl`, and `default` selects `fabs` for other types, including `double` and integer types. The `_Generic` expression selects a function; the trailing `(X)` calls it. section 18.2
_Generic(\textit{controlling expression},
\textit{type1}: \textit{expression1},
... ,
\textit{typeN}: \textit{expressionN})
The controlling expression supplies the type used for selection. Each association pairs a type with a result expression; one association may use `default` instead of a type. `_Generic` is an expression, not a macro feature, though it fits naturally inside a macro. section 18.2
**TAKEAWAY:** Choose `_Generic` when an interface needs to distinguish a fixed set of types. For a two-argument `min` interface, the controlling expression can be the sum of the arguments, so their promotions and conversions affect the type used for selection. Covering more combinations can quickly multiply the cases; C23 type inference offers another approach to type-dependent code. section 18.2 section 18.0

