7

On page 1/2 of xfp package we see x >? y as a valid comparison operator. Is it different from x>y? I think they are equivalent based on my following code, but not sure:

  \documentclass{article}

\usepackage{,xfp}

\begin{document}

\edef\x{5} \edef\y{6} \fpeval{\x>? \y}\ \fpeval{\x> \y} \end{document}

The result for both is zero. So are they equivalent in general?

Aria
  • 1,523
  • May I ask where to find the documentation for x ?y – Aria Aug 14 '20 at 07:53
  • \fpeval is just a wrapper of latex3 function \fp_eval:n (documented in interface3) which accepts a floating point expression. 2) From the doc, sec. XXIII.9.3, a relation operator should consists of a non-empty string of <, =, >, and ?, optionally preceded by !, and may not start with ?. 3) Hence \x >? \y means if \x is greater than or not ordered with \y.
  • – muzimuzhi Z Aug 14 '20 at 08:05
  • @HenriMenke Thanks for pointing out that. I should be more cautious. – muzimuzhi Z Aug 14 '20 at 08:07