How to change the number of digits in the scientific notation in l3?

I guess you want

\documentclass{article}
\usepackage{siunitx,xfp}

\begin{document}

\num[scientific-notation=true]{\fpeval{3785*23}}

\end{document}

enter image description here

More examples:

\documentclass{article}
\usepackage{siunitx,xfp}

\begin{document}

\num[scientific-notation=true]{\fpeval{3785*23}}

\num[scientific-notation=true,round-mode=figures]{\fpeval{3785*23}}

\num[scientific-notation=true,round-mode=figures,round-precision=3]{\fpeval{3785*23}}

\end{document}

enter image description here


Here's a solution that combines \num from the siunitx package with LuaLaTeX.

enter image description here

\documentclass{article}
\usepackage{siunitx}
\newcommand\myeval[1]{\directlua{tex.sprint(#1)}}

\begin{document}
\num[scientific-notation=true]{ \myeval{3785*23} } 
\end{document}

Tags:

Siunitx

L3Fp