The first argument to \ifthenelse
must contain a test (by default a test on integer equality).
You could do \ifthenelse{\fpeval{\x<\y}=1}{...}{...}
which would return true if \x
is actually less than \y
.
Example:
\documentclass{article}
\usepackage{xfp,ifthen}
\begin{document}
\def\x{6.25}
\def\y{-2}
\ifthenelse{\fpeval{\x<\y}=1}{TRUE}{FALSE} (should be F)
\ifthenelse{\fpeval{\y<\x}=1}{TRUE}{FALSE} (should be T)
\end{document}

With more flexible (and fully expandable) code that I already suggested you
\documentclass{article}
\usepackage{xfp,xparse}
\usepackage{xparse}
\ExplSyntaxOn
\NewExpandableDocumentCommand{\xifthenelse}{mmm}
{
\bool_if:nTF { #1 } { #2 } { #3 }
}
\cs_new_eq:NN \numtest \int_compare_p:n
\cs_new_eq:NN \oddtest \int_if_odd_p:n
\cs_new_eq:NN \fptest \fp_compare_p:n
\cs_new_eq:NN \dimtest \dim_compare_p:n
\cs_new_eq:NN \deftest \cs_if_exist_p:N
\cs_new_eq:NN \namedeftest \cs_if_exist_p:c
\cs_new_eq:NN \eqdeftest \token_if_eq_meaning_p:NN
\cs_new_eq:NN \streqtest \str_if_eq_p:ee
\cs_new_eq:NN \emptytest \tl_if_blank_p:n
\prg_new_conditional:Nnn \xxifthen_legacy_conditional:n { p,T,F,TF }
{
\use:c { if#1 } \prg_return_true: \else: \prg_return_false: \fi:
}
\cs_new_eq:NN \boolean \xxifthen_legacy_conditional_p:n
\ExplSyntaxOff
\begin{document}
\def\x{6.25}
\def\y{-2}
\xifthenelse{\fptest{\x<\y}}{TRUE}{FALSE} (should be F)
\xifthenelse{\fptest{\y<\x}}{TRUE}{FALSE} (should be T)
\end{document}
\fpeval
is supposed to evaluate to a number. I don't know the full rules, but I'd guess it's 1 if the test is true and 0 otherwise. In that case you'd want\ifthenelse{\fpeval{\x<\y }=1}
. If it's 0 if the test is false and non-zero otherwise, you'd probably want to go for\ifthenelse{\fpeval{\x<\y }=0}
and invert the logic.