LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Monospaced Font
Show Text Part by Default
Show All Mail Headers

Message: [<< First] [< Prev] [Next >] [Last >>]
Topic: [<< First] [< Prev] [Next >] [Last >>]
Author: [<< First] [< Prev] [Next >] [Last >>]

Print Reply
Subject:
From:
Joseph Wright <[log in to unmask]>
Reply To:
Mailing list for the LaTeX3 project <[log in to unmask]>
Date:
Thu, 27 Aug 2015 08:50:57 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (25 lines)
On 26/08/2015 00:44, aparsloe wrote:
> (2) Using \fp_to_scientific:n on the result of an l3fp calculation
> produces, say, 6.023e23. I want to write this as 6.023 \times 10^{23},
> but the "e" of 6.023e23 doesn't have its "usual" catcode so
> \tl_replace_once:Nnn doesn't find the "e". (I presume "e" has catcode
> "other" -- I haven't checked.) Hence I rescan 6.023e23 with an empty
> setup and then use \tl_replace_once:Nnn (which now does find the "e").

Your question has prompted us to take another look at
\fp_to_scientific:n/\fp_to_tl:n. The catcode of "e" is clearly not
expected here: I'm going to adjust to produce a 'letter'. We are
wondering about the wider use case for \fp_to_scientific:n: as it stands
the code doesn't *always* produce a number of the for

  [-]<digits>.<digits>e[-]<digits>

so it can't be parsed without some testing. That's little different to
\fp_to_tl:n, which in many ways might be more generally useful. Can you
fill us in on your use?

Joseph

P.S. Something seems to be up with your system/e-mail date settings: all
of your mail is from the future!

ATOM RSS1 RSS2