From 29c459636115f7de4ae9a8681927b52a1e896805 Mon Sep 17 00:00:00 2001
From: Karl Berry <karl@freefriends.org>
Date: Tue, 28 Feb 2012 00:40:51 +0000
Subject: l3kernel 3471 (26feb12)

git-svn-id: svn://tug.org/texlive/trunk@25525 c570f23f-e606-0410-a88d-b1316a301751
---
 Master/texmf-dist/tex/latex/l3kernel/l3int.sty | 40 ++++++++++++--------------
 1 file changed, 18 insertions(+), 22 deletions(-)

(limited to 'Master/texmf-dist/tex/latex/l3kernel/l3int.sty')

diff --git a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
index 2747a0afeeb..f12cda36783 100644
--- a/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
+++ b/Master/texmf-dist/tex/latex/l3kernel/l3int.sty
@@ -46,7 +46,7 @@
 %%
 %% -----------------------------------------------------------------------
 \RequirePackage{l3names}
-\GetIdInfo$Id: l3int.dtx 3315 2012-02-06 11:17:04Z bruno $
+\GetIdInfo$Id: l3int.dtx 3460 2012-02-26 12:16:41Z will $
   {L3 Experimental integers}
 \ProvidesExplPackage
   {\ExplFileName}{\ExplFileDate}{\ExplFileVersion}{\ExplFileDescription}
@@ -90,29 +90,25 @@
   }
 \cs_new:Npn \int_div_truncate:nn #1#2
   {
-    \int_value:w \int_eval:w
-      \if_int_compare:w \int_eval:w #1 = \c_zero
-        0
-      \else:
-        ( #1 % )
-        \if_int_compare:w \int_eval:w #1 < \c_zero
-          \if_int_compare:w \int_eval:w #2 < \c_zero
-            - ( #2 + % )
-          \else:
-            + ( #2 - % )
-          \fi:
-        \else:
-          \if_int_compare:w \int_eval:w #2 < \c_zero
-            + ( #2 + % )
-          \else:
-            - ( #2 - % )
-          \fi:
-        \fi: % ( (
-        1 ) / 2 )
-      \fi:
-      / ( #2 )
+    \int_use:N \int_eval:w
+      \exp_after:wN \int_div_truncate_aux:NwNw
+      \int_use:N \int_eval:w #1 \exp_after:wN ;
+      \int_use:N \int_eval:w #2 ;
     \int_eval_end:
   }
+\cs_new:Npn \int_div_truncate_aux:NwNw #1#2; #3#4;
+  {
+    \if_meaning:w 0 #1
+      \c_zero
+    \else:
+      (
+        #1#2
+        \if_meaning:w - #1 + \else: - \fi:
+        ( \if_meaning:w - #3 - \fi: #3#4 - \c_one ) / \c_two
+      )
+    \fi:
+    / #3#4
+  }
 \cs_new:Npn \int_div_round:nn #1#2 { \int_eval:n { ( #1 ) / ( #2 ) } }
 \cs_new:Npn \int_mod:nn #1#2
   {
-- 
cgit v1.2.3

