[latex3-commits] [latex3/latex3] fp-func: Test fn(a, b) for l3fp (dfe112ab7)

github at latex-project.org github at latex-project.org
Wed Jul 5 16:08:41 CEST 2023


Repository : https://github.com/latex3/latex3
On branch  : fp-func
Link       : https://github.com/latex3/latex3/commit/dfe112ab72f5acaa401122eebe91d9ce17b5239a

>---------------------------------------------------------------

commit dfe112ab72f5acaa401122eebe91d9ce17b5239a
Author: Joseph Wright <joseph.wright at morningstar2.co.uk>
Date:   Wed Jul 5 15:08:41 2023 +0100

    Test fn(a,b) for l3fp


>---------------------------------------------------------------

dfe112ab72f5acaa401122eebe91d9ce17b5239a
 l3trial/l3fp-extras/testfiles/m3fp-functions001.lvt |  6 ++++++
 l3trial/l3fp-extras/testfiles/m3fp-functions001.tlg | 10 ++++++++++
 2 files changed, 16 insertions(+)

diff --git a/l3trial/l3fp-extras/testfiles/m3fp-functions001.lvt b/l3trial/l3fp-extras/testfiles/m3fp-functions001.lvt
index 801a13bb9..536132567 100644
--- a/l3trial/l3fp-extras/testfiles/m3fp-functions001.lvt
+++ b/l3trial/l3fp-extras/testfiles/m3fp-functions001.lvt
@@ -41,6 +41,12 @@
     \iow_term:x { \fp_to_tl:n { fourthroot(1,2) } }
   }
 
+\TEST { Defining~npow }
+  {
+    \fp_set_function:nnn { npow } { a,b } { a**b }
+    \iow_term:x { \fp_to_tl:n { npow(16,0.25) } }
+  }
+
 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
 
 \END
diff --git a/l3trial/l3fp-extras/testfiles/m3fp-functions001.tlg b/l3trial/l3fp-extras/testfiles/m3fp-functions001.tlg
index 0f2a5d063..1dc7f2fdf 100644
--- a/l3trial/l3fp-extras/testfiles/m3fp-functions001.tlg
+++ b/l3trial/l3fp-extras/testfiles/m3fp-functions001.tlg
@@ -19,3 +19,13 @@ Defining \__fp_parse_word_a:N on line ...
 (1.)^(0.25)
 1
 ============================================================
+============================================================
+TEST 3: Defining npow
+============================================================
+Defining \__fp_parse_word_npow:N on line ...
+Defining \__fp_parse_word__i:N on line ...
+Defining \__fp_parse_word_a:N on line ...
+Defining \__fp_parse_word__ii:N on line ...
+Defining \__fp_parse_word_b:N on line ...
+2
+============================================================





More information about the latex3-commits mailing list.