LATEX-L Archives

Mailing list for the LaTeX3 project

LATEX-L@LISTSERV.UNI-HEIDELBERG.DE

Options: Use Forum View

Use Proportional Font
Show HTML 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:
Mon, 5 May 2014 10:17:05 +0100
Content-Type:
text/plain
Parts/Attachments:
text/plain (39 lines)
On 05/05/2014 09:55, Frank Mittelbach wrote:
> Am 05.05.2014 01:08, schrieb Heiko Oberdiek:
>> Improved version with higher precision:
>>
>>    \cs_new:Npn \__dim_strip_bp:n #1
>>      {
>>        \__dim_strip_pt:n
>>          {
>>            \__dim_eval:w ( #1 ) * 800 / 803 \__dim_eval_end:
>>          }
>>      }
>>
>> * 800/803 is the integer fraction for 72/72.27
> 
> 
> perhaps I'm completely off the mark, but isn't this introducing a
> restriction on the values that can be entered? (ie generating an
> overflow by doing *800 first)
> 
> frank

    \input expl3-generic %
    \ExplSyntaxOn
    \tl_set:Nx \l_tmpa_tl
      {
        \__dim_strip_bp:n { \c_max_dim }
      }
    \tl_show:N \l_tmpa_tl

gives

    > \l_tmpa_tl=macro:
    ->16322.74998.
    <recently read> }

which I think is OK.
--
Joseph Wright

ATOM RSS1 RSS2