REF TRANSARITH James Anderson, Oct 2010 COPYRIGHT James Anderson 2010. All rights reserved. >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<< TRANSARITH >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<< >>>>>>>>>>>>>>>>>>>>>> <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< This file describes how to install Poplog and the transarith package which implements transreal and transcomplex arithmetic. It also describes the identifiers, such as procedures and constants, defined by the package. Both the implementation and documentation comprising the package are available as on-line appendices to a journal paper describing transcomplex arithmetic. CONTENTS - (Use g to access required sections) -- 1 Installation -- 1.1 Install Poplog -- 1.2 Install transarith implementation -- 1.3 Install transarith documentation -- 1.4 Test the transarith package -- 2 Introduction -- 3 Naming Conventions -- 4 Constants -- 5 Predicates Relating to Numbers -- 6 Type Checking -- 7 Comparisons on Numbers -- 8 Number Representation -- 9 Arithmetical Operations -- 10 Mathematical Functions -- 11 Test Procedures -- 12 Transcript 1 Installation --------------- Take the following three steps to install the transarith package on a computer running a Microsoft Windows or a Unix operating system. Then take the fourth step to demonstrate that the package is working. You can check the installation at every step. If you are new to Poplog it might take some time to work through these steps. 1.1 Install Poplog ------------------- Install Poplog from the following web site. This will create the directory $poplocal and the related directories needed for the remaining installation steps. http://www.cs.bham.ac.uk/research/projects/poplog/freepoplog.html Keep a note of where $poplocal is on your disk. If you forget, you can recover this information by typing the following comma/quadrand into Pop11. sysfileok('$poplocal') => It is a good idea to start Pop11 and type this command. This will allow you to check that you have installed Poplog correctly. Experts in Poplog will have more sophisticated ways of doing the installation. If you are confident that you know what you are doing, then install the transarith package any way you want to. 1.2 Install transarith implementation -------------------------------------- Move the file transarith.p to the directory $poplocal/../lib/lib/ This completes the installation of the source code. If you want to, make the file read only so that its contents cannot be changed by accident. You can check the installation by typing the following command into pop11. It will open the contents of transarith.p in Ppp11's editor - ved. Be careful not to change the contents of the file! showlib transarith 1.3 Install transarith documentation ------------------------------------- Move the file, transarith, to the directory $poplocal/../ref/ and, if you want to, make the file read only so that its contents cannot be changed by accident. Type the following two commands into Pop11. They will reconstruct the index of reference documents: lib mkrefindex; mkrefindex('$poplocal/../ref'); This completes the installation of the documentation. The transarith package is now ready to use. You can check that you have put the file transarith in the correct place by typing the following command into Pop11. It will open the contents of transarith in Pop11's editor. ref transarith You can check that you have rebuilt the index of reference documents correctly by typing the following command into Pop11. It will open the reference document in Pop11's editor close to the definition of nullity. help nuly A better way to access the definition of the constant nuly is to type the following command into ved's command line: ?? nuly If all else fails, just print out the documentation file transarith and refer to it as needed! 1.4 Test the transarith package -------------------------------- Load the transarith package by typing the following command into Pop11: lib transarith Pop11 pints a message when it loads the package. Now type the following command to raise zero to the power of zero. 0 ##** 0 => Pop11 prints two asterisks, which mark the beginning of an output stream, followed by the printable symbol for nullity. Nullity is zero divided by zero. ** 0_/0 2 Introduction --------------- The transreal and transcomplex numbers support a total arithmetic in which any defined arithmetical operation can be applied to any transnumber(s) such that the result is a transnumber. Hence, neither transreal nor transcomplex arithmetic has any undefined or indefinite values. In particular, division by zero is well defined. In principal, transreal and transcomplex arithmetic never suffer an arithmetical exception at run time, but the implementation supplied here is layered on top of an ordinary implementation of Pop11 so it can fail on a floating-point error or a memory fault. This package is provided simply as a model of what might be achieved with transreal hardware. The package has been implemented so that it always takes a transcomplex path to a solution if one is available. This provides the strongest test of transcomplex arithmetic, but it degrades numerical accuracy. This implementation is not suitable for applications requiring a high degree of numerical accuracy. The transreal numbers are all of Pop11's real number types and three constants, the words pinf = "1_/0", ninf = "-1_/0" and nuly = "0_/0". These constants can be used to introduce the non-finite transreal numbers into a calculation. Alternatively, the arithmetical operators can be used to divide a number by zero so as to produce a non-finite number. For example, 1 ##/ 0 = pinf. The transcomplex numbers are a Pop11 class implementing a three-tuple (r,c,s) of a non-negative transreal radius, r, which is the Euclidean transmetric of a transcomplex vector; and c and s which are, respectively, the cosine and sine this vector makes with the positive, real axis. Pop11's arithmetical procedures suffer complex contagion, which is to say that if any argument to a procedure is complex then the result is complex. However, the arithmetical procedures supplied here do not suffer contagion. The transcomplex procedures return a transreal result wherever this is possible. This provides stronger diagnostics, but its impact on execution time and programming idioms is not known at present. (It is unlikely that the current practice of contagion will long survive the introduction of quaternions and octonions into computer languages, though such introduction may well be a very long time away.) 3 Naming Conventions --------------------- Procedures and constants may have a name which begins with a prefix, followd by an underbar, as follows. "tr_" means "transreal". "tc_" means "transcomplex". "trans_" means polymorphic "trans_real" or "trans_complex". "test_" means the identifier is a testing procedure for use by system developers and readers of the companion paper. 4 Constants ------------ pinf = "1_/0" [constant] Constant denoting transreal positive infinity. ninf = "-1_/0" [constant] Constant denoting transreal negative infinity. nuly = "0_/0" [constant] Constant denoting transreal nullity. tc_pinf = constranscomplex(pinf, 1, 0) [constant] Constant denoting transreal positive infinity as a transcomplex number. tc_ninf = constranscomplex(pinf, -1, 0) [constant] Constant denoting transreal negative infinity as a transcomplex number. tc_nuly = constranscomplex(nuly, nuly, nuly) [constant] Constant denoting transreal nullity as a transcomplex number. tc_zero = constranscomplex( 0, 1, 0) [constant] Constant denoting real zero as a transcomplex number. tc_i = constranscomplex( 1, 0, 1) [constant] Constant denoting the complex unit (i.e. the square root of minus one) as a transcomplex number. 5 Predicates Relating to Numbers --------------------------------- istransreal(item) -> bool [procedure] Returns true if item is of type transreal. Returns false otherwise. All of Pop11's built in real types are transreal. isstrictlytransreal(item) -> bool [procedure] Returns true if item is one of the non-finite transreal numbers: pinf, ninf, nuly. Returns false otherwise. istranscomplex(item) -> bool [procedure] Returns true if item is of type transcomplex. Pop11's complex types are NOT transcomplex and do NOT generalise to transcomplex types. However, the whole of complex arithmetic can be performed by transcomplex arithmetic. The difference is in the structure of the underlying numbers, not in the arithmetical operations that can be applied to the numbers. isstrictlytranscomplex(item) -> bool [procedure] Returns true if item is of type transcomplex and has at least one component which is non-finite. istransnumber(item) -> bool [procedure] Returns true if item is of type transreal or transcomplex. 6 Type Checking ---------------- checktransreal(item) [procedure] checkstrictlytransreal(item) [procedure] checktranscomplex(item) [procedure] checkstrictlytranscomplex(item) [procedure] checktransnumber(item) [procedure] These procedures check, respectively, that item returns true with the following predicates: istransreal, isstrictlytransreal, istranscomplex, isstrictlytranscomplex, or istransnumber. If so, no action is taken; otherwise a mishap message is printed and execution halts, unless trapped. 7 Comparisons on Numbers ------------------------- The following operators operate on transreal numbers. The equality operators have the same precedence (7) as Pop11's builtin equality operators. The builtin equality operators can also be used on transnumbers. The remaining relational operators have precedence (6) to match the precedence of the corresponding relational operators built in to Pop11. Operators with a precedence closer to zero bind more tightly. All of the operators provided here can be applied to the individual components of a transnumber. num1 ##= num2 -> bool num1 ##/= num2 -> bool These operators compare their transreal arguments for mathematical equality and inequality respectively. num1 ##> num2 -> bool num1 ##/> num2 -> bool num1 ##>= num2 -> bool num1 ##/>= num2 -> bool num1 ##< num2 -> bool num1 ##/< num2 -> bool num1 ##<= num2 -> bool num1 ##/<= num2 -> bool num1 ##<> num2 -> bool num1 ##/<> num2 -> bool num1 ##<=> num2 -> bool num1 ##/<=> num2 -> bool These operators compare their first transreal argument to be, respectively, grater than, not greater than, greater than or equal, not greater than or equal, less than, not less than, less than or equal, not less than or equal, less than or greater than, not less than or greater than, less than or equal or greater than, not less than or equal or greater than their second transreal argument. Note that whereas real numbers obey the axiom of trichotomy - a real nember can be less than, equal to, or greater than zero - the transreal numbers obey the axiom of quadrachotomy with a fourth case - a number can be equal to nullity. In particular 0 ##<=> nuly returns false and 0 ##/<=> nuly returns true. 8 Number Representation ------------------------ stdrcs(num1, num2, num3) -> (num4, num5, num6) [procedure] The arguments num1, num2, num3 are arbitrary transreal numbers corresponding, respectively, to the radius, cosine, and sine of a transcomplex number. The return values num4, num5, num6 are, respectively, the radius, cosine, and sine in canonical form. That is, with all of the mathematical constraints between the components applied. constransreal(num1, num2) -> num3 [procedure] Constructs a transreal number, num3, with numerator num1 and denominator num2. That is, num3 = num1 ##/ num2. If the result is irrational then the denominator is not stored explicitly, instead it is assumed to be unity. desttransreal(num1) -> (num2, num3) [procedure] Destroys a transreal number num1, returning its numerator, num2, and denominator, num3. tr_num(num1) -> num2 [procedure] Returns the numerator, num2, of the transreal number, num1. This procedure does not have an updater. tr_den(num1) -> num2 [procedure] Returns the denominator, num2, of the transreal number, num1. This procedure does not have an updater. transcomplex_key [constant] Structure key for transcomplex numbers. No key for the transreals is supplied here, because transreals use builtin types and have builtin keys. See REF * KEYS. constranscomplex(num1, num2, num3) -> num4 [procedure] Constructs a transcomplex number, num4, with radius num1, cosine num2, and sine num3. This procedure creates num4 in canonical form, respecting all of the mathematical constraints between the components num1, num2, num3. desttranscomplex(num1) -> (num2,num3,num4) [procedure] Destroys a transcomplex or transreal number, num1, returning its radius, cosine and sine. tc_rad(num1) -> num2 [procedure] num2 -> tc_rad(num1) [updater] This procedure and its updater access the radius field of a transcomplex number. The mathematical constraints between components of a transcomplex number are not enforced. tc_cos(num1) -> num2 [procedure] num2 -> tc_cos(num1) [updater] This procedure and its updater access the cosine field of a transcomplex number. The mathematical constraints between components of a transcomplex number are not enforced. tc_sin(num1) -> num2 [procedure] num2 -> tc_rad(num1) [updater] This procedure and its updater access the sine field of a transcomplex number. The mathematical constraints between components of a transcomplex number are not enforced. casttransreal(num1) -> num2 [procedure] This procedure casts num1 to the equivalent transreal number, num2, if there is one, otherwise it returns num1 as num2. Casting is possible where the transcomplex number lies on the real axis or is nullity. casttranscomplex(num1) -> num2 [procedure] This procedure casts num1 to the equivalent transcomplex number, num2. 9 Arithmetical Operations -------------------------- The symbol # denotes a number, so num1 ##- num2 is an infix subtraction applying to two numbers and #- is a prefix negation applying to one number. It would be possible to overlay Pop11's builtin arithmetical operators, without introducing any new syntax, but this would have massive impact on the performance of the Poplog system, especially where it interacts with external languages. num1 ##+ num2 -> num3 [operator 5] num1 ##- num2 -> num3 [operator 5] num1 ##* num2 -> num3 [operator 4] num1 ##/ num2 -> num3 [operator 4] These operators respectively add, subtract, multiply, and divide, any transnumbers. num1 ##** num2 -> num3 [operator 3] This operator raises transnumber num1 to the power of transnumber num2. 10 Mathematical Functions ------------------------- The prefix "tr_" means transreal, "tc_" means transcomplex, and "trans_" means transnumber, that is, a number which is either transreal or transcomplex. Some of the functions supplied here are needed to implement transarithmetic, but most are provided only because they might be helpful to users. tr_abs(num1) -> num2 [procedure] Returns the absolute value of num1. If num1 is transreal then num2 = num1 when num1 ##>= 0, but num2 = ##- num1 when num1 ##< 0. If num1 is transcomplex then num2 is the radius of num1. For any transreal num1 it is the case that num1 = tr_sgn(num1) ##* tr_abs(num1). See also trans_abs. tr_sgn(num1) -> num2 [procedure] Returns the sign of num1. So num2 = 1 when num1 ##> 0; num2 = -1 when num1 ##< 0; num2 = 0 when num1 ##= 0; num2 = nuly when num1 ##= nuly. For any transreal num1 it is the case that num1 = tr_sgn(num1) ##* tr_abs(num1). See also trans_sgn which returns 2 at some angle for non-finite transreal or transcomplex numbers. tr_signeddistance(num1, num2) -> num3 [procedure] Returns the signed distance from num2 to num1. When num1 = num2 the signed distance num3 = 0, otherwise num3 = num1 ##- num2. tr_distance(num1, num2) -> num3 [procedure] Returns the absolute value of the distance between num1 and num2. Consequently, tr_abs(x) is equivalent to tr_distance(x, 0). tr_cos(num1) -> num2 [procedure] Returns the transreal cosine, num2, corresponding to the transreal angle, num1. Hence -1 <= num2 <= 1 or num2 = nuly. The transreal cosine is identical to the ordinary cosine for all real angles. tr_sin(num1) -> num2 [procedure] This procedure returns the transreal sine, num2, corresponding to the transreal angle, num1. Hence -1 <= num2 <= 1 or num2 = nuly. The transreal sine is identical to the ordinary sine for all real angles. tr_exp(num1) -> num2 [procedure] Returns the transreal exponential, num2, of the transreal number, num1. The transreal exponential, tr_exp, is identical to the real exponential for all finite transreal numbers. See also the more general function trans_exp. tr_log(num1) -> num2 [procedure] Returns the transreal logarithm, num2, of the transreal number, num1. The transreal logarithm, tr_log, is identical to the real logarithm for all finite transreal numbers. See also the more general function trans_log. trans_exp(num1) -> num2 [procedure] Returns the transcomplex exponential, num2, of the arbitrary transnumber, num1. The transexponential is identical to the real and complex exponentials for all finite transreal and transcomplex numbers. trans_log(num1) -> num2 [procedure] Returns the transcomplex logarithm, num2, of the arbitrary transnumber, num1. The translogarithm is identical to the real and complex logarithms for all finite transreal and transcomplex numbers. trans_sqrt(num1) -> num2 [procedure] Returns the transcomplex square root, num2, of the arbitrary transnumber, num1. trans_abs(num1) -> num2 [procedure] The argument, num1, is a transnumber with the (implied) transcomplex components (r1,c1,s1). The return value, num2, is a transreal or transcomplex number with the (implied) components (r1,1,0) reduced to canonical form by stdrcs. In other words, it is the radius laid along the positive, real axis. For all transcomplex num1, it is the case that casttransreal(num1) = casttransreal(trans_sgn(num1) ##* trans_abs(num1)). See also: tr_abs. trans_sgn(num1) -> num2 [procedure] The argument, num1, is a transnumber with the (implied) transcomplex components (r1,c1,s1). The return value, num2, is a transreal or transcomplex number with the (implied) components (1,c1,s1) when r1 in finite and (2,c1,s1) when r1 is non-finite. In each case, num2 is reduced to canonical form by stdrcs. In other words, it is a radius laid along the vector (r1,c1,s1). For all transcomplex num1, it is the case that casttransreal(num1) = casttransreal(trans_sgn(num1) ##* trans_abs(num1)). It is also the case that the sign of any transnumber is tr_sgn(c1). See also: tr_sgn. 11 Test Procedures ------------------ The prefix "test_" introduces a test procedure. The procedures "test_N", where N is a number, are used to check numerical examples that appear in the companion journal paper, excluding quotations within that paper. For example, test_1() tests the examples on Page 6 of the paper. But the page numbers given here are the page numbers of the text of the paper as submitted for review. These page numbers may be different in the published version of the paper. For example, the published paper might not start on page one. The output of the procedures is given in the next section. Page Test ---- ---- 6 1 11 2 12 3 13 4 15 5 16 6 17 7 18 8 19 9 20 10 21 11 22 12, 13 23 14 24 15 34,35,36 16 41 17 43 18 46 19 51 20 52 21 53 22 12 Transcript ------------- This is a transcript of the computation of various transreal and transcomplex values, including all of the numerical examples in the companion journal paper. The transcript has been composed from several programming sessions and has had some line lengths altered to accommodate the obligatory format of a reference (documentation) file. The test procedures, described in the section above, print out a page number which is where the examples occur in the paper as submitted for review. These page numbers might change during the publication process. For example, the published paper might not start on page one. Some calculations appear on several pages of the paper and appear once in each test procedure corresponding to a page. : test_1(); ** Page 6 ** [nuly => 0_/0] ** [pinf => 1_/0] ** [ninf => -1_/0] ** [pinf ##/ pinf => 0_/0] ** [pinf ##- pinf => 0_/0] ** [0 ##** 0 => 0_/0] ** [trans_exp ( ninf ) => 0] ** [trans_log ( 0 ) => -1_/0] ** [nuly = 0 ##** 0 => ] ** [nuly = trans_exp ( trans_log ( 0 ##** 0 ) ) => ] ** [nuly = trans_exp ( 0 ##* trans_log ( 0 ) ) => ] : test_2(); ** Page 11 ** [#- 0 = 0 => ] ** [ninf = ninf => ] ** [#- nuly = nuly => ] ** [trans_sqrt ( 0 ) = 0 => ] ** [trans_sqrt ( #- 0 ) = 0 => ] ** [0 ##/ 1 = 0 => ] ** [0 ##/ #- 1 = 0 => ] ** [1 ##/ 0 = pinf => ] ** [#- 1 ##/ 0 = ninf => ] ** [0 ##/ 0 = nuly => ] ** [pinf ##/ pinf = nuly => ] ** [ninf ##/ pinf = nuly => ] ** [pinf ##/ ninf = nuly => ] ** [ninf ##/ ninf = nuly => ] ** [pinf ##* 0 = nuly => ] ** [ninf ##* 0 = nuly => ] ** [0 ##* pinf = nuly => ] ** [0 ##* ninf = nuly => ] ** [pinf ##- pinf = nuly => ] : test_3(); ** Page 12 ** [pinf ##+ 1 = pinf => ] : test_4(); ** Page 13 ** [1 ##/ ( pinf ##+ 1 ) = 0 => ] ** [nuly = 0 ##* tr_sin ( pinf ) => ] : test_5(); ** Page 15 ** [1 = 1 ##/ 1 => ] ** [#- 1 = #- 1 ##/ 1 => ] : test_6(); ** Page 16 ** [0 = 0 ##/ 1 => ] ** [pinf = 1 ##/ 0 => ] ** [ninf = #- 1 ##/ 0 => ] ** [nuly = 0 ##/ 0 => ] ** [nuly = pinf ##/ pinf => ] ** [ninf = pinf ##/ #- 3 => ] : test_7(); ** Page 17 ** [nuly = pinf ##- pinf => ] ** [nuly = nuly ##- pinf => ] : test_8(); ** Page 18 ** [nuly = pinf ##* ( 2 ##- 2 ) => ] ** [nuly = pinf ##* 2 ##- pinf ##* 2 => ] ** [pinf = pinf ##* ( 2 ##- 1 ) => ] ** [nuly = pinf ##* 2 ##- pinf ##* 1 => ] ** [nuly = pinf ##* 0 => ] ** [nuly = pinf ##- pinf => ] : test_9(); ** Page 19 ** Gravitational attraction between P_1 and P_2. ** [( ( 6.7 ##* 10 ##** #- 11 ) ##* ( 3.2 ##* 10 ##** #- 27 ) ##* ( 3.2 ##* 10 ##** #- 27 ) ) ##/ ( 0 ##** 2 ) => 1_/0] ** Gravitational attraction between singularity and P_3. ** [( ( 6.7 ##* 10 ##** #- 11 ) ##* ( 2 ##* 3.2 ##* 10 ##** #- 27 ) ##* ( 3.2 ##* 10 ##** #- 27 ) ) ##/ ( ( 1.6 ##* 10 ##* #- 35 ) ##** 2 ) => 5360000.0] ** Electrostatic repulsion between P_1 and P_2. ** [( ( 9 ##* 10 ##** 9 ) ##* ( 1.6 ##* 10 ##** #- 19 ) ##* ( 1.6 ##* 10 ##** #- 19 ) ) ##/ ( 0 ##** 2 ) => 1_/0] ** Electrostatic repulsion between singularity and P_3. ** [( ( 9 ##* 10 ##** 9 ) ##* ( 2 ##* 1.6 ##* 10 ##** #- 19 ) ##* ( 1.6 ##* 10 ##** #- 19 ) ) ##/ ( ( 1.6 #* 10 ##** #- 35 ) ##** 2 ) => 180 0000000000000800000000000000000000000000.0] : test_10(); ** Page 20 ** [nuly = pinf ##- pinf => ] ** [5.4 ##* 10 ##** 6 ##- 1.8 ##* 10 ##** 42 => -18000000000000190000000 00000000000000000000.0] : test_11(); ** Page 21 ** [pinf = pinf ##/ 0 => ] ** [nuly = pinf ##/ pinf => ] : test_12(); ** Page 22 ** Table 3: F = ma with k_m = 2, k_a = 3 ** [m = 0 a = -1_/0 F = 0_/0] ** [m = 0 a = -3 F = 0] ** [m = 0 a = 0 F = 0] ** [m = 0 a = 3 F = 0] ** [m = 0 a = 1_/0 F = 0_/0] ** [m = 0 a = 0_/0 F = 0_/0] ** [m = 2 a = -1_/0 F = -1_/0] ** [m = 2 a = -3 F = -6] ** [m = 2 a = 0 F = 0] ** [m = 2 a = 3 F = 6] ** [m = 2 a = 1_/0 F = 1_/0] ** [m = 2 a = 0_/0 F = 0_/0] ** [m = 1_/0 a = -1_/0 F = -1_/0] ** [m = 1_/0 a = -3 F = -1_/0] ** [m = 1_/0 a = 0 F = 0_/0] ** [m = 1_/0 a = 3 F = 1_/0] ** [m = 1_/0 a = 1_/0 F = 1_/0] ** [m = 1_/0 a = 0_/0 F = 0_/0] ** [m = 0_/0 a = -1_/0 F = 0_/0] ** [m = 0_/0 a = -3 F = 0_/0] ** [m = 0_/0 a = 0 F = 0_/0] ** [m = 0_/0 a = 3 F = 0_/0] ** [m = 0_/0 a = 1_/0 F = 0_/0] ** [m = 0_/0 a = 0_/0 F = 0_/0] : test_13(); ** Page 22 ** Table 4: a = F/m with k_F = 2, k_m = 3 ** [F = -1_/0 m = 0 a = -1_/0] ** [F = -1_/0 m = 3 a = -1_/0] ** [F = -1_/0 m = 1_/0 a = 0_/0] ** [F = -1_/0 m = 0_/0 a = 0_/0] ** [F = -2 m = 0 a = -1_/0] ** [F = -2 m = 3 a = -2_/3] ** [F = -2 m = 1_/0 a = 0] ** [F = -2 m = 0_/0 a = 0_/0] ** [F = 0 m = 0 a = 0_/0] ** [F = 0 m = 3 a = 0] ** [F = 0 m = 1_/0 a = 0] ** [F = 0 m = 0_/0 a = 0_/0] ** [F = 2 m = 0 a = 1_/0] ** [F = 2 m = 3 a = 2_/3] ** [F = 2 m = 1_/0 a = 0] ** [F = 2 m = 0_/0 a = 0_/0] ** [F = 1_/0 m = 0 a = 1_/0] ** [F = 1_/0 m = 3 a = 1_/0] ** [F = 1_/0 m = 1_/0 a = 0_/0] ** [F = 1_/0 m = 0_/0 a = 0_/0] ** [F = 0_/0 m = 0 a = 0_/0] ** [F = 0_/0 m = 3 a = 0_/0] ** [F = 0_/0 m = 1_/0 a = 0_/0] ** [F = 0_/0 m = 0_/0 a = 0_/0] : test_14(); ** Page 23 ** Table 5: m = F/a with k_F = 2, k_a = 3 ** [F = -1_/0 a = -1_/0 m = 0_/0] ** [F = -1_/0 a = -3 m = 1_/0] ** [F = -1_/0 a = 0 m = -1_/0] ** [F = -1_/0 a = 3 m = -1_/0] ** [F = -1_/0 a = 1_/0 m = 0_/0] ** [F = -1_/0 a = 0_/0 m = 0_/0] ** [F = -2 a = -1_/0 m = 0] ** [F = -2 a = -3 m = 2_/3] ** [F = -2 a = 0 m = -1_/0] ** [F = -2 a = 3 m = -2_/3] ** [F = -2 a = 1_/0 m = 0] ** [F = -2 a = 0_/0 m = 0_/0] ** [F = 0 a = -1_/0 m = 0] ** [F = 0 a = -3 m = 0] ** [F = 0 a = 0 m = 0_/0] ** [F = 0 a = 3 m = 0] ** [F = 0 a = 1_/0 m = 0] ** [F = 0 a = 0_/0 m = 0_/0] ** [F = 2 a = -1_/0 m = 0] ** [F = 2 a = -3 m = -2_/3] ** [F = 2 a = 0 m = 1_/0] ** [F = 2 a = 3 m = 2_/3] ** [F = 2 a = 1_/0 m = 0] ** [F = 2 a = 0_/0 m = 0_/0] ** [F = 1_/0 a = -1_/0 m = 0_/0] ** [F = 1_/0 a = -3 m = -1_/0] ** [F = 1_/0 a = 0 m = 1_/0] ** [F = 1_/0 a = 3 m = 1_/0] ** [F = 1_/0 a = 1_/0 m = 0_/0] ** [F = 1_/0 a = 0_/0 m = 0_/0] ** [F = 0_/0 a = -1_/0 m = 0_/0] ** [F = 0_/0 a = -3 m = 0_/0] ** [F = 0_/0 a = 0 m = 0_/0] ** [F = 0_/0 a = 3 m = 0_/0] ** [F = 0_/0 a = 1_/0 m = 0_/0] ** [F = 0_/0 a = 0_/0 m = 0_/0] : test_15(); ** Page 25 ** Exact integer computation: ** [2 ** ( 10 + 1 ) - 2 => 2046] ** [2 ** ( 23 + 1 ) - 2 => 16777214] ** [2 ** ( 52 + 1 ) - 2 => 9007199254740990] ** [2 ** ( 112 + 1 ) - 2 => 10384593717069655257060992658440190] ** Floating-point computation following a transcomplex path: ** [2 ##** ( 10 ##+ 1 ) ##- 2 => 2046.0] ** [2 ##** ( 23 ##+ 1 ) ##- 2 => ] ** [2 ##** ( 52 ##+ 1 ) ##- 2 => 9007199254740984.0] ** [2 ##** (112 ##+ 1 ) ##- 2 => 10384593717069630000000000000000000.0] ** No signed zero: ** [0 = #- 0 and 1 ##/ 0 = 1 ##/ #- 0 => ] : test_16(); ** Page 34 ** [ + => ] : test_17(); ** Page 41 ** [1_/0 ##/ 0 = 1_/0 => ] : test_18(); ** Page 43 ** [nuly ##/ tr_sqrt ( nuly ##** 2 ##+ nuly ##** 2 ) = nuly => ] : test_19(); ** Page 46 ** [pinf ##- pinf = nuly => ] ** [ninf ##+ pinf = nuly => ] ** [nuly ##- nuly = nuly => ] ** [#- nuly ##+ nuly = nuly => ] ** [tr_cos ( ninf ) = nuly and tr_sin ( ninf ) = nuly => ] ** [tr_cos ( pinf ) = nuly and tr_sin ( pinf ) = nuly => ] ** [tr_cos ( nuly ) = nuly and tr_sin ( nuly ) = nuly => ] : test_20(); ** Page 51 ** This is not a numerical example in the paper, but it is important ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => 0.0000000000000001] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => 0.0000000000000001] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => 0.0000000000000001] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => 0.0000000000000001] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => 0.0000000000000001] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => 0.0000000000000001] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => 0.0000000000000001] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] ** [z1 = ] ** [z2 = ] ** [z1 ##+ z2 => ] : test_21(); ** Page 52 ** [ ##* = => ] ** [istranscomplex ( ) => ] ** [istransreal ( ) => ] ** [ ##* = 1_/0 => ] : test_22(); ** Page 52 ** [ ##+ = 1_/0 => ] ** [ ##- = 0_/0 => ] ** [ ##/ = 0_/0 => ] ** [0 ##/ 0 = 0_/0 => ] ** [ ##* 0 = 0_/0 => ] --- Copyright James Anderson 2010. All rights reserved. ---------------