LaTeX3 l3fp offers a way to check if a variable has a an infinite value. The following code defines a number and then sets its value to π/2. It then calculates tan(π/2) to get a large result.
\ExplSyntaxOn
\fp_new:N \mynumber
\fp_new:N \pi_half
\fp_div:Nn \pi_half{\c_pi_fp/2}
\fp_tan:Nn \mynumber{\pi_half}
\texttt{\mynumber}\\
\fp_if_infinity:NTF \c_infinity_fp {NaN}{Do~something~with~\number}\\
\ExplSyntaxOff
In many languages the indeterminate form is normally indicated by NaN what would be a good strategy to define a macro to test for this in expl3 for all cases of NaN, such as division by zero etc?