Numipulator® Help
Personal Edition 5.2
topaccolades.com
   
Overall Index Index of numipulation box types

Overview

Welcome to Numipulator from TopAccolades Ltd. Numipulator enables you to develop games, puzzles and other graphical applications without your having to write programs that specify a set of instructions, which you would have to do in most computing languages. You will still be writing programs, but you do so using a language that is possibly the simplest programming language in existence.

At its heart, it is an advanced numerical manipulator and calculator, suitable for business, education and home use. Crucially, it enables you to carry out calculations not only on individual numbers but on lists of numbers, to determine properties of lists of numbers, including statistical functions, and to manipulate lists of numbers.

Graphical interfaces

The graphical output for an application always consists of a grid of graphics cells. There are two graphical interfaces that both make use of a grid. The simplest is the Animation Zone, which allows no direct user interaction but has a nine-button square game keypad that the user can press (e.g. to select a directional arrow). The other grid, the Graphics Formatter, allows the user to click/tap on individual cells to provide interaction. The key to developing graphical output, in both cases, is the mapping of numbers to format (including colour, border and, in some cases, shape, character, emoji or image), to be displayed in the cells of the grid.

In the simplest graphical interface, the Animation Zone, the number 1 is mapped to a white square, 2 to a black square, 3 to a red square, 4 to a green square, 5 to a blue square, and so on up to 20, which is mapped to a beige square. So, the list of numbers 5, 1, 3, 4 would be displayed in the interface as four square cells with borders: a blue one, a white one, a red one and a green one. Larger numbers can be used to specify millions of different colours. Overall, the cell displays of the graphical output of any application in the Animation Zone are derived from one input list of numbers, all of which are format codes. For a 10x10 grid, the input list must have 100 numbers in it, while a 20x20 grid must have an input list with 400 numbers in it. Note: negative format codes result in borderless squares, while 0 results in a borderless black cell (useful for background).

The Graphics Formatter is more complex and has, as inputs, two lists of numbers of the same length. The first represents a list of values, while the second represents a list of format codes. With this, each pair of cells from the two lists together define the display of the corresponding cell in the grid (e.g. the display of the 3rd cell in the grid is determined by the 3rd value in the list of values and the 3rd format code of the second list). So, the pair of numbers -54.2 and 5 displays the value -54.2 on a blue background. In this example, the format code is the same as that used for the Animation Zone, but many other codes are also available with the Graphics Formatter. With these additional codes, the 0-20 colour-related codes already described are still used, but this time to represent the foreground and background colours of certain characters, shapes, emojis or images. In addition, simple output mapping may be used to specify that certain text, or even nothing, be displayed instead of the simple number value, e.g. -2 might be mapped to the word Month, so that the word Month would be displayed in the output instead of -2. Overall, the resuting interface can display numbers, text, characters, emojis and other images, or simple colour.

Numerical manipulation and calculation

Clearly, the lists of numbers that are inputs to the Animation Zone or Graphics Formatter must come from somewhere. Individual calculations and manipulations are specified in numipulation boxes. Most of these are laid out in a grid-like fashion, and each of these has a reference name, e.g. A1 or L3 - similar to those found in spreadsheets. A reference name may be an input to any other numipulation box (or graphical formatter), enabling you to string together many calculations and manipulations in order to achieve your desired output, including specifying the output formats, all in one calculation, which can be triggered by pressing the = button (as with a calculator).

The inputs to these numipulation boxes are either simple numbers or lists of numbers, or certain text that represents a number or a list of numbers, including pi (meaning π), keypad (representing the number of the key tapped on the keypad), or text/characters that are defined by the programmer to be mapped to numbers in inputs, e.g. A mapped to -1, B mapped to -2, through to Z mapped to -26, which enables letters to be used in inputs instead of certain numbers, so that the input number list A P P L E S O R A N G E is taken to be the number list -1 -16 -16 -12 -5 -19 -15 -18 -1 -14 -7 -5, if this proves useful, as it might do in word/letter games. All the calculations and manipulations are designed to operate only on numbers or lists of numbers, and to have as their output either a number or a list of numbers. The numbers in a list are separated by any number of spaces, commas, colons, semicolons, returns, tabs or comments {text within curly brackets like this}. Numipulator has no functionality to handle text (apart from the input/output mapping).

The function or operation to be applied to these inputs (if any) is selected by the programmer from a drop-down list. This makes program development very straightforward and, together with the flexible approach to the inputting of numbers in lists, makes the Numipulator programming language very simple to learn, with little awkward syntax to be encountered.

As well as being used to produce graphical output, these numipulation boxes can also be used to carry out numerical calculations and manipulations that you might normally carry out with a spreadsheet or other specialist application. It includes trigonometric functions, statistical functions, conversions (weight, distance, time, etc.), and functionality for solving quadratic and simultaneous equations. It supports the transfer of numerical data from a complete spreadsheet table or worksheet into one of its list inputs, and enables a formatted output list to be copied and pasted back into a spreadsheet worksheet, through its text-based Table Formatter. Numipulator and a spreadsheet working together can be a powerful combination.

Processing engine, repetitions and state

Unless you are programming a static puzzle, your program will need to handle dynamic graphics and user interaction. In some cases, a change in the graphics presented can be triggered by user interaction, e.g. clicking on a particular cell of the Graphics Formatter (in games or puzzles such as Peg Solitaire or Sudoku), while in others you will want the graphics to change even without user interaction (games such as the old Space Invaders game, where a player must interact with a constantly changing graphical interface). To handle the latter (and also the former), Numipulator incorporates a processing engine that enables you to perform a sequence of calculations using the numipulation boxes, rather than just one. In every cycle, the numipulation boxes are evaluated, as are the inputs to the graphical interfaces. These repetitions continue until a specified comparison between two number values succeeds, e.g. A1 > 0. After each cycle, the start of the next cycle can be delayed for a certain time (this can be specified as the evaluated output of a numipulation box). This delay time can be used to speed up or slow down the game speed; it also provides a time for the player to respond to the new graphics display in the Graphics Formatter.

Most games and puzzles will need to incorporate some concept of state, e.g. the positions of pieces on a board, or the score. In Numipulator, this is implemented using special memory numipulation boxes, where an output from one cycle is transferred, by the processing engine, to become an input in the next cycle.

Style of programming

The style of programming found in Numipulator is called declarative programming, as the results of all outputs are declared, or specified (through its inputs and selection of function/operation to be applied), and you don't write programs that tell the computer how to go about executing the program: there is no provision for writing procedures or instructions about how the evaluation is to be carried out, and the language does not make use of variables, whose values can change during an evaluation. The mapping of inputs and outputs is also declarative, being specified by simple mapping statements. The main style of programming can also be described as element reference programming, a form of programming with functions also employed by spreadsheets.

Apps, numiplets and standalone apps

The above functionality enables you to develop fairly sophisticated games, puzzles, utilities and business applications. You can save these as apps that run within the Numipulator environment. Each app is a complete Numipulator set-up: a set of definitions or specifications, mappings and settings. These Numipulator set-ups, called Numiplets, can be saved, either as simple text files or in local storage, if your browser supports this. With local storage, and a browser that allows actions to be carried out when you exit Numipulator, your current set-up is also saved automatically when you exit Numipulator as the Current Saved Numiplet, ready for automatic reloading when you open it again.

You can also create standalone apps from your graphical Numiplets that should run in any browser, using the Numipulator Standalone Maker app. You can share these with others, maybe on your own website, by emailing them, or in some other way.

Numipulator provides many built-in Numiplets, some business-related, some demonstrations, but mostly games or puzzles. We suggest you try these early on to help you to see and understand the power of Numipulator.

Important

You are strongly encouraged to save Numipulator locally, on your local PC or device, as this will give you improved performance and also allow you to use Numipulator when you're offline.

The best way to obtain a local copy is to download it from www.numipulator.com. Alternatively, save it as a simple web page from the open Numipulator page (Numipulator consists of a single HTML file only). For example, with Chrome on a Windows PC, bring up the Save As... box (right mouse click or Ctrl-S), then choose the type as 'Web Page, HTML only(*.htm.*.html)' (not as Web Page, complete or any other option), and save to an appropriate folder. Similarly, on a Mac, save it with format Webpage, HTML Only. When you wish to use Numipulator again, just open the downloaded file in a suitable browser.

Numipulation boxes

The main components of Numipulator are numipulation boxes. These are modelled on the way you probably first learned to carry out addition, subtraction and so on at school. There, you probably laid out a simple calculation something like this:

23
45 +
68

That is, the inputs were placed underneath each other, a line was drawn, and the result was put underneath. The operation to be carried out was also made clear (+, or addition, in this case).

A numipulation box is essentially a computerized version of this. For example, a numipulation box for carrying out simple operations on two numbers, such as addition and subtraction, looks like this:

Number Operation
*a
*b
*A1
  
  i  
      
  X  

The components of this are as follows:

  • At the top is a general description of the type of numipulation box - in this case Number Operation.  
  • The next two lines (in this case) are input fields, with labels.  
  • The next line normally consists of a drop-down list, from which you can select the operation (or function in other cases) to be carried out. The text shown in this may refer to the input labels, as in this case.  This operation field separates the inputs from the result.
  • Below this line is a result or output field, which also has a label (A1 in this example).  This label is the reference name of the numipulation box - a key feature, as discussed later. Note: this field is also referred to as the reference field 
  • On the bottom line, with a yellow background, is a note field, in which you can add some text describing the output (or inputs);
  • Also on the bottom line are two buttons, one green and one red:
    • The green i button may be pressed after a calculation to summarize the inputs, their values and the output value. The information supplied is as given by the Values button, but just for this box. This enables you to see the output value (before any rounding), which is particularly useful for Common Numbers and Lists, where the output value is not shown in the box;
    • The red X button clears the input and output values of the box, and changes the function/operation selection back to its default. Note: you will be asked to confirm this action.

Once the inputs have been entered, and the operation selected, the = button (Calculate) may be pressed; the result is shown in the result field (as shown above).

The great advantage of this layout when compared to a calculator is that once the calculation has been carried out you see, or have access to, not only the result but also the inputs and the operation carried out. You won't feel the need to repeat the calculation just in case you entered the wrong numbers or pressed the wrong operation key. And because the standard layout has five Number Operation numipulation boxes, each, by default, ready for a different operation (+, -, X, / and %), in order to carry out the operations commonly found on a calculator you don't even have to select the operation from a drop-down list - just choose the box already displaying this operation.

This layout also provides considerable advantages when compared to a spreadsheet. Most importantly, you don't have to enter a formula just to multiply two numbers together. In fact, with Numipulator, you don't have to enter formulae at all - just select the operation to be carried out (although you can choose to define your own expressions in Row X and elsewhere). Furthermore, the operation remains visible in the box, whereas on a spreadsheet the formula is not generally displayed - only its resulting value.

There are many types of numipulation box, some simpler, some more complex than the Number Operation box. When the = button is pressed, all the calculations are carried out and the results put into the results fields.

Note: to display Help specific to a particular type of numipulation box, click on the numipulation box heading, or type name, (e.g. the words 'Number Operation') at the top of the numipulation box. This will open up the Help page in the Information Zone and move to the beginning of the relevant section of the page. You can also get relevant Help for other features by clicking on other headings including: 'Constants and Internal Values', 'Repetitions', 'Table Formatter', 'Graphics Formatter' and 'Animation Zone'.

Information Zone

This is an area near the top of the page which is opened when you request further information or output, e.g. Help, Getting Started, Notes, Values and Flow. To close this, just tap on its Close button. You may also tap the Open button in this to display the contents in a new window (whether this happens depends on your browser/device).

Main Buttons

These buttons are found down the left side of the page. They should remain in this position even when the page is scrolled, so should always be available.

: Make the whole page visible (but not necessarily the Information Zone), and scroll to the top of the page.

Help : Open this Help page in the Information Zone.

IM : Initialize Memories: for every Memory Number or Memory List, replace the text in the mem field with the text in the init field, unless the init field is empty.

Clear : Clear/Reset All (clear all inputs and outputs, set the number of numipulation boxes for each A-Z type to the default 5, and set operation selections and most other settings (inc. rounding and separator) back to their defaults). Note: You will be asked to confirm this action, but in case you accidentally delete data, all your settings are saved in the Main Output window towards the bottom of Numipulator.

Notes : Show, in the Information Zone, the reference name and accompanying note for any numipulation box that has a note defined.

Values : Show, in the Information Zone, the definitions, values and notes for numipulation boxes and other fields involved in the last calculation, in the order of evaluation.

Flow : Show, in the Information Zone, the relationships between all defined numipulation boxes and other fields, in a top-down fashion.

Save : Save current set-up to local storage, as Current Saved Numiplet, or, if local storage is unavailable, show the current set-up in the Information Zone ready for saving to a text file.

= : Calculate (carry out one set of calculations).

Start : Initialize memories, then start a series of repetitions, as defined by the Repeat until condition.

Go : Start, or continue, a series of repetitions, as defined by the Repeat until condition (with no memory initialization).

Stop : Stop a series of repetitions at the end of this cycle and display the results so far.

Numbers and lists

The Number Operation numipulation box deals only with numbers. Others deal with numbers and lists of numbers, or just with lists.

Most people are familiar with lists of numbers. After or during shopping, we may want to add up the total of everything we've bought from a number of shops; or, we may want to look through a list of prices and select the most or least expensive or check how many items we bought. Numipulator differs from calculators and spreadsheets in that lists are handled as core object types, which can be manipulated as a whole. Lists, whether as inputs or results in numipulation boxes, are always shown as multiline text areas, in contrast to numbers, which are shown as single-line text fields.

A list is treated in Numipulator as just a sequence of zero or more numbers. Note that a list with exactly one number on it is effectively identical to the single number on it.

One of the simplest types of numipulation box that handles lists is the List Function to Number box. This takes a list as its input and produces a number as its result.

List Function to Number
*la
*C1
  
  i  
      
  X  

This numipulation box lets you easily find out several simple properties of the list, such as the sum of all its values, the number of items, the minimum, the maximum, or the average. For the more statistically-minded, it also lets you calculate properties such as the median, first quartile, variance or standard deviation.

In many cases, lists are handled item by item. This makes Numipulator very convenient for handling many numbers when you wish to carry out the same operation on each. So, for example, the Items Operation numipulation box carries out the same operation on corresponding items in two lists to give the resulting list, as shown in the first example below. If the second list consists of just one item, it will carry out the same operation using this number on each of the items in the first list, as shown in the second example below.

Items Operation
*[a]'
*[b]"
*V1
  
  i  
      
  X  
Items Operation
*[a]'
*[b]"
*V1
  
  i  
      
  X  

In some cases, a list consists of a set of parameters for an operation. So, for example, the List Generation numipulation box with numbers 1, 3, 8, 11 in the input field and a selected operation of 'Integers p1->p2' generates a list of integers for each pair of numbers, i.e. from 1->3 and 8->11 in the input list, giving a result list 1, 2, 3, 8, 9, 10, 11.

List Generation
*p1,p2...
p1,p2...
...
*G3
  
  i  
      
  X  

Entering numbers and lists

Putting in a number into a number field is straightforward. Just type or paste a single number into the field. This may be an integer (whole number), negative number, a decimal fraction (e.g. 3.25, 4.01 or .2), or an e-notation number (e.g. 2.4e+3, which means 2.4X103 or 2400) . Note: if you use a decimal point, it must have at least one numeral after it; 32. is unacceptable - use 32 or 32.0 instead.

A list is simply a sequence of numbers separated by one or more of the following: space, tab, paragraph (newline or carriage return), comma (,), semicolon (;) or colon (:). Note: your browser will probably not allow tabs to be entered when typing, but you can paste in lists that use tab-separated items. So, the list of numbers 1, 2, 3 may be entered in a list field as, for example:


This makes Numipulator input straightforward, as the numbers may be copied from many other applications, such as spreadsheets, in their native format and then pasted into the list field. Although the list field is small, you may paste a very large table from a spreadsheet into it; it won't be easy to see, but it will be there. The different types of separator also enable you to format your inputs, if you wish; in the List Generation example above, the two pairs are shown on different lines, while the two members of each pair are separated by a comma and space, so that the pairs of parameters stand out.

Comments

A list, or even a number, field may also include comments. A comment begins with an opening curly bracket, {, and ends with the next closing curly bracket, }. The comment is treated as a separator, but is otherwise ignored.

Tables

Although lists and numbers are the only core object types in Numipulator, some numipulation boxes are designed to perform operations on or transformations of a table. In such cases, the input table is always defined by two inputs: a list and a number (a positive integer).

  • The list (given the identifier la) always represents the values in the cells of the table, laid out along the rows (starting at the top row and always going left-to-right).
  • The number (given the identifier ncols) always represents the number of columns in the table;

So, the input table

1 2 3 4
6 3 2 7
8 9 0 1

would be represented by la=1, 2, 3, 4, 6, 3, 2, 7, 8, 9, 0, 1 and ncols=4

The number of rows in the table is, of course, implied by la and ncols.

Because the only core object types in Numipulator are lists and numbers, a table cannot be the result of a numipulation box. However, the list of cell values can, of course, be given as the result. So, for example, if the above input table had its rows and columns transposed in an operation, giving the table

1 6 8
2 3 9
3 2 0
4 7 1

the result would be given as the list of cell values (starting at the top row and always going left-to-right):

1, 6, 8, 2, 3, 9, 3, 2, 0, 4, 7, 1

Note: Numipulator uses the number of columns as a parameter (rather than number of rows) because tables of data in spreadsheets are generally designed to have a fixed number of columns, but a variable number of rows, so, when handling a table, the number of columns is generally a given. Numipulator bases its handling of a table where la is an empty list accordingly, i.e. treating the input table as still having a given number of columns, but no values in these (i.e. 0 rows). So, if la=L0 (representing an empty list, as discussed later) and ncols=3, the sums of its columns would be 0, 0, 0 (3 columns, each with a sum of 0), while the sums of its rows would be L0 (an empty list, as there are no rows).

Note: Numipulator also provides a single Table Formatter, a Graphics Formatter and an Animation Zone. These take a list of numbers and format the list as a table (the Table Formatter allows you to specify a certain number of rows or columns, with the numbers laid out either horizontally or vertically). These, however, are not numipulation boxes and their outputs cannot be used as inputs to any numipulation box. They are for displaying results only.

Structured lists: SLists

Numipulator's simple syntax does not allow lists to have sublists; only numbers are allowed as elements of a list. This means that you cannot directly represent lists with sublists, such as you might find in other languages (e.g. Javascript), of the form [[27, 28], [], [29, 30, 31, 32]], which is a list having 3 sublists, the first with 2 elements, the second with 0 elements (an empty list), the third with 4 elements. Such lists/sublists can be useful for storing data of different lengths.

Instead, it allows a special type of number list, a structured list or SList, to be used, where the number of items in a "sublist" is placed before the elements of the sublist. So, the above example can be specified as 2 27 28 0 4 29 30 31 32, where a number in red here represents the number of items following (note that no items follow the 0).

There are special functions (all of whose names begin with SList:) that allow the creation of SLists, the accessing of the contents of specified "sublists", and the lengths of the "sublists". These can be found in List Function to List, List Operation and List & List Operation numipulation boxes.

Use of reference names in input fields

You can, of course, just enter numbers or lists of numbers into the input fields and treat Numipulator as a powerful, easy-to-use calculator. But to get the most value from it, you need to make use of reference names. These allow you to specify that the resulting value of one numipulation box should be used as input to another numipulation box. In this way, complex calculations can be carried out with one press of the = (Calculate) button.

The value of a numipulation box during a calculation is defined as:

  • the result of the operation in the box, if there is one (which will be shown in the result or reference field);
  • the value defined by the reference field of the box, i.e. its input, if there is no operation in the box (e.g. Common Number or Memory Number).

As a simple example, if you bought something for 25.30 and sold it for 37.15, and you had to pay 20% tax on the difference, you could calculate the tax due using two Number Operation numipulation boxes, where the difference (A1) is an input to A2, which calculates 20%:

Number Operation
*a
*b
*A1
  
  i  
      
  X  
Number Operation
*a
*b
*A2
  
  i  
      
  X  

Now, in Numipulator, a list is simply a sequence of zero or more numbers. The reference name for a numipulation box whose value is a number may therefore also be used to represent that value/number in a list input. So, for example, if the set-up included A1 and A2 as above, an input list might be defined as 42.36, A2, 53, where the value of A2, i.e. 2.37, is the second item on the list that has the value 42.36, 2.37, 53.

The reference names for lists may also be entered into other fields. There are three cases to consider:

1) Simple reference of one list in another list input.

This specifies that the value, or result, of G3 should be used as the input. So, if G3 has the value 5, 6, 7 this input also has the value 5, 6, 7.

2) Combination of number and list reference names and/or numbers

In these cases - and 1) is just a simple case of this - the items of the lists referred to are inserted as items of the input list. So, if G3 had a list value 5, 6, 7, while A2 had a number value 49 and G4 had a list value 34, 35, 36, then the input list would have the value 46, 5, 6, 7, 49, 34, 35, 36.

To those used to other programming languages, this free mixing of number and list reference names in inputs may seem unusual. If, however, you consider that a list is simply a sequence of numbers, and assume that there is an implicit 'followed by' operator between the elements of an input, then 46 G3 A2 G4 above has the meaning 46 followed by G3 followed by A2 followed by G4. G3 has the value 5, 6, 7 which means 5 followed by 6 followed by 7, A2 means 49 and G4 means 34 followed by 35 followed by 36, so the overall meaning is 46 followed by 5 followed by 6 followed by 7 followed by 49 followed by 34 followed by 35 followed by 36.

3) A list reference name as input to a number field

The reference name of a numipulation box that has a list value may also be specified as the value of a number input field. However, at run-time, this list must have exactly one number on it, which is taken as the number input (remember that in Numipulator, a list is just a sequence of numbers, so a list with exactly one number on it is just a number. A run-time error will occur if the list referred to does not have exactly one number. So, if G3 has the list value 5, and G4 has the list value 34 and you enter G3 and G4 as the inputs of a Number Operation addition, the result would be 39 (i.e. 5 + 34).

This feature makes Numipulator very flexible, as you can use numipulation boxes concerned with operations on items of a list to handle single numbers.

Several numipulation boxes are concerned with operations on items of a list. For example, as well as Number Operation numipulation boxes concerned with the addition, subtraction, and so on, of simple numbers, there are also Items Operation boxes dealing with the same operations on corresponding items in a list. A list may, of course, have just one item, so you could put individual numbers into each of the input fields of an Items Operation box and have a result that is also a list with a single number. The ability to use reference names of lists in inputs to number fields means that you can effectively treat Items Operation numipulation boxes as additional Number Operation boxes (and others similarly) if you find the need.

Because of this feature, Numipulator does not include individual number-only versions of some of its more complex numipulation boxes (Measure Conversions or If-Then-Else boxes, for example); the versions with list outputs supplied can be freely used to produce single-number list values that can be used anywhere as a simple number input.

Common Numbers and Common Lists

Frequently, you will want to carry out some calculations on the same number or list (which you already know, and don't need to calculate), or you will just want to enter your input data, numbers or lists in some convenient locations. The Common Number and Common List numipulation boxes, found in rows D and E, are available for this purpose. These have input fields only and no separate output/result field. Enter the number or list in the only field of these boxes (apart from Note, of course) and refer to it as input to any other numipulation boxes.

There are also wider Common Number boxes (called Num1 and Num2) and wider Common List boxes (called List1 and List2) near the Table Formatter. These are particularly suitable for entering data where you wish to include comments, or make use of the wider note field. Many of the built-in Numiplets make use of these, as they are close to the Table and Graphics Formattters and Animation Zone.

Note: You can also enter reference names in these input fields, but you will not see the resulting value displayed in the box. It will continue to display the reference name(s). Pressing the green 'i' button to the right of the note, will show you the value, if you wish to see it, following a calculation.

So, if you wanted to calculate the difference between the maximum and minimum values of list 3 2 4 6 5 7, enter this in Common List E1. You could then enter E1 as the input of C1 and select Maximum value, and also as the input of C2 and select Minimum value, and enter C1 and C2 as inputs of A1, with the Subtract operation selected. The results would be:

C1=7
C2=2
A1=5

Note: this is by way of example; you could calculate the difference between the maximum and minimum values more easily by entering the list as input to C1 and selecting Range.

Ensuring you enter the correct reference name

The numipulation box you wish to refer to may be some way away from the box in which you're entering its reference name. It is easy to forget the reference name or mistype it. Numipulator provides two facilities to help you:

Transfer of reference name using the asterisk

If you click on the reference name of a numipulation box, i.e. on the bold, white name to the right of the reference field, this reference name is remembered by Numipulator. It is also shown in the Selected Name field, in the middle near the top of the page. At any time after that (until you click on a different reference name), if you click on the asterisk (*) to the left or below an input field (list or number), the reference name will be inserted into the field. The mode of insertion differs for number fields and list fields:

  • for number fields, which can take only one value, the reference name replaces any existing input value;
  • for list fields, which can take any number of values, the reference name is added at the end of any existing values.

Showing notes

It is good practice, when undertaking complex calculations, to enter a note in each numipulation box, to remind yourself of what the value refers to, e.g. Co-ordinates of X; Initial Amount; Interest Rate; or Price List. To help you quickly see which reference name you should be entering, you can press the Notes button on the left; this will display the reference names and accompanying note of each numipulation box with a note in the Information Zone.

Constants and Internal Values

Underneath the main rows of numipulation boxes is a box labelled Constants and Internal Values. This lists the built-in unchangeable values you can use, namely pi, e* and L0 (that's L-zero not L-oh). It also contains the name of a list called now that is concerned with the date and time, and click, which indicates whether a mouse-click has occurred in the Graphics Formatter, and keypad, which is associated with the Animation Keypad. These are reference names that can be used like any other reference name, i.e. you can enter them in input fields and you can click on the names in the Constants and Internal Values box to put the reference name into memory ready for placing in input fields via the asterisks.

The first two, pi and e*, represent the well-known mathematical constants π, approx. 3.142, and e (the base of natural logarithms), approx. 2.718. We use e* rather than e to free the single letter up for textual outputs.

The third item, click, has only two possible values, 1 or 0. In any calculation cycle, its value is 0 unless a mouse-click has occurred and been acknowledged in the Graphics Formatter just before this cycle, in which case it has the value 1.

The fourth, keypad, has 10 possible values: 0-9. If the Animation Keypad has been clicked since the beginning of the previous cycle, it will be set to value represented by the click. If no such click has been made, it will be set to 0.

The fifth, L0, represents the empty list, i.e. a list with no items (a list with zero items). This symbol is also output in a result field if the result is a list with no items. For example, if you use a Find All numipulation box to find all the items in list 10, 20, 30, 40, 50 that are greater than 60, Numipulator will, of course, find no items. Rather than leave the result field blank, the result L0 is output. You can also enter it as an input in list fields (see later for why you might want to do this). If, however, you enter it in a number field, the calculation will result in an error message in the result field, since an empty list has no single item that can be used in the calculation.

The last item, now, is a list of numbers associated with the time and date. The values on the list are calculated at the beginning of a calculation cycle (i.e. as soon as an = button has been pressed, or at the beginning of each repetition cycle). The list contains 8 items, all referring to the local date/time determined at this moment (according to the user's computer). The example below assumes the date is August 29, 2023, and the time is 10:14:57 (i.e. 57 seconds after 10:14am)

Date Format: The date in YYYYMMDD format, i.e. 20230829
Year: 2023
Month: 8
Date: 29
Hour: 10
Minute: 25
Second: 14
Milliseconds: This value represents the number of milliseconds since January 1, 1970 (not the number of milliseconds since the beginning of the current second). This is generally a more useful number, as it enables easy calculation of periods, e.g. time between cycles. In this case the value is 1693300497784

The value of now would be: 20230829, 2023, 8, 29, 10, 14, 57, 1693300497784

Remember: This value is evaluated once and once only in each calculation cycle: at the beginning.

Items and cycling

Many numipulation boxes have, as one of their list inputs, a list that is to be treated as a set of individual items. If there is only one of these, the length of the item list determines the length of the resulting list, since the operation is carried out for each item on the list of items in turn, and the individual results determine the output.

The label of such a list is always given in square brackets, e.g. [a] or [b]. The descriptions of the operations that can be selected generally refer to the letter inside the brackets. So, for example, a Count numipulation box has two input lists, la and [b]. A typical operation that can be selected is Items on la < b. Given an input list la = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10 and a list of items, [b] = 12, 5, 0, the result would be 10, 4, 0 (i.e. 10 items < 12, 4 items < 5 and 0 items < 0).

Several types of numipulation box carry out operations or comparisons on the corresponding items of two or more lists. For example, the Items Operation box takes two lists and carries out simple operations such as addition or subtraction on the corresponding items. So, we saw above that in such a numipulation box, if the first list contains items 2, 4, 6, 8 and the second 3, 4, 5, 6, then selection of the Add operation results in the list 5, 8, 11, 14.

Clearly, for this to work the operation has to have the same number of items to work on. But, in fact, as seen in the second Items Operation example earlier, we can have several items on the first, but only one on the second. This is because Numipulator allows cycling of items, as explained next.

If there is more than one list of items, one of these - and it's always the top one - is treated as the primary item list, and given a single quote after its name to denote this, e.g. [a]'. All others are treated as secondary item lists, and given a double-quote after their names to denote this, e.g. [b]". The primary item list determines the number of operations carried out, since the operation is carried out on each of its items in turn. The secondary items are taken one at a time to be used in these operations; if the end of a secondary item list is reached but there are still items in the primary list to be dealt with, items are selected from the beginning of the secondary list again. That is, the secondary items are cycled to match the primary items.

To demonstrate, suppose the primary list, [a]', has values 2, 4, 6, 8 - that is, 4 items. Let's look at what happens if a secondary item list has 1, 2, 3, 4 or 5 items in it.

  • if [b]" has one item = 10, then it is treated as the list 10, 10, 10, 10
  • if [b]" has two items = 10, 20, then it is treated as the list 10, 20, 10, 20
  • if [b]" has three items = 10, 20, 30, then it is treated as the list 10, 20, 30, 10
  • if [b]" has four items = 10, 20, 30, 40, then it is treated as the list 10, 20, 30, 40
  • if [b]" has five items = 10, 20, 30, 40, 50, then it is treated as the list 10, 20, 30, 40 - i.e. any surplus items are ignored

The common cases, where there is just one item on a secondary item list or the same number as on the primary item list, can be seen to be special cases of this general approach to handling more than one item list.

Parameters and excess parameters

Several numipulation boxes (List Generation, Range Selection, Table Operation and Formula) have a list input where the list is treated as a list of parameters. The label for such a list always begins p1,p2 . The operation selected includes information about the number of parameters expected (e.g. Integers p1->p2 implies 2 parameters; p1 random ints p2->p3 implies 3 parameters).

In all cases, the list may include more than one set of these parameters. So, for example, an input list 2, 5, 8, 12 for Integers p1->p2 would yield a result 2, 3, 4, 5, 8, 9, 10, 11, 12 (i.e. integers 2->5 followed by integers 8->12). If the number of parameters in the input list is not a whole number multiple of the number of parameters expected, any excess ones are ignored. So, for example, if the input list to Integers p1->p2 were 2, 5, 8, 12, 14, the last number 14 would be ignored and the result would be the same as for an input list 2, 5, 8, 12.

Mostly, the sets of parameters are considered as independent, and the result list consists of the results based on the first set of parameters, followed by the results based on the second set of parameters, and so on - as shown for the Integers p1->p2 example above. With Range Selection, however, the sets of parameters are considered all together, and only one set of results is produced. The label of the parameter list denotes this using the character '|' (read it as OR) as a separator between the sets of parameters:

p1, p2 |
p1, p2 | ...

Formatting list results

By default, when list results are displayed, the items on the list are separated by a space. You may choose to change this by clicking on a different radio button under Output Separator for Lists in the Settings box towards the bottom of the Numipulator page. You can choose to have items separated by a paragraph (i.e. each item on a new line), a comma, a semicolon, a space, a comma+space, a semicolon+space, or a tab. All list result displays will use the selected separator.

Numipulation boxes - layout

Most of the numipulation boxes are laid out as a table. As standard, Numipulator has 5 columns. The following description is essentially for a 5-column layout.

The rows are A, B, C ... Z, while the columns are 1, 2... 5. The reference names of the boxes are derived from their positions in the tables:

A1, A2, A3, A4, A5
B1, B2, B3...........
....
Z1, Z2, Z3, Z4, Z5

Note: There are 25 rows: there is no row I.

The general layout is that the more commonly-used or more easily understood numipulation boxes are towards the top. So, the operations or functions normally found on a simple calculator are in rows A and B, while simple functions of lists, e.g. summing up the items, are found in row C. Memory Number and Memory List, are in rows Y and Z - close to the Repetitions area, as they are generally used with repetitions.

There are also two other numipulation boxes, which are wider than others, just below row Z, on either side of the Constants and Internal Values box. These are a Formula box and an Equation Solver box. The expectation is that these will normally be used for single calculations, hence there is only one of each.

Additional numipulation boxes

At the end of each row of boxes (A-Z) are two buttons: a + and a -. Pressing the + button adds a new row of 5 boxes of the same type under the current row, with appropriate reference numbers, e.g. A6 - A10. There is no theoretical limit to the number of additional boxes. Pressing the - button removes the last row of boxes, although you may not have less than one row of 5 boxes. Note that you will be asked to confirm deletion of a row of boxes.

Navigation

Near the top of the Numipulator page, on the right, is a drop-down menu of the sections of the page (except for the Information Zone), including the individual rows of the main table. Selecting one of these hides the sections between the menu area at the top and the selected area, so that the selected area is near the top. You may restore the hidden sections, and move to the top of the page, by pressing the white up-arrow on a black background to the left of the menu, or the white up-arrow at the top of the main buttons on the left.

Numipulation boxes - types and operations

Please note that the following symbols for number comparison are used in some of the descriptions below:
< means less than; <= means less than or equal to; = means equal to; <> means not equal to (less than or greater than); >= means greater than or equal to; > means greater than.

Number Operation - Row A

These take two numbers as inputs and produce a number as a result. Important: The Calculator and Expression functions found in List Function to Number enable multiple operations to be performed rather than just one (see also the Calculator list and Expression list functions in List Function to List, and the Calculator (a Op Num...) and Expression (a Op Num...) functions in Items Coded Operations).

Add: a+b

Simple addition of a and b. Example: a=5, b=2: Result=7

Subtract: a-b

Simple subtraction of b from a. .Example: a=5, b=2: Result=3

Multiply: aXb

Simple multiplication of a and b. Example: a=5, b=2: Result=10

Divide: a/b

Simple division of a by b. Example: a=5, b=2: Result=2.5

%: aXb/100

Result is b% of a. Example: a=150, b=10: Result=15

% add: a+(aXb/100)

Result is a + b% of a. Example: a=150, b=10: Result=165 (150+15)

Note: this is useful for taking a base price (a) and determining price including tax, at rate b%.

Power: a^b

Result is ab. Example: a=2, b=3: Result=8 (i.e. 2X2X2). Example: a=2, b=-3: Result=0.125 (1/(2X2X2).
Example: a=4, b=0.5: Result=2 (square root of 4).
Example: a=-4, b=0.5: Result=NaN (Not a Number, or undefined)

Round a to b dec. pl.

Round a to b decimal places. Example: a=2.3467, b=2: Result=2.35.
Example: a=2.3467, b=1: Result=2.3; Example: a=2.3467, b=2: Result=2.35;
Example: a=2.3467, b=-2: Result=undefined. Example: a=2.3467, b=2.5: Result=undefined.

Div: a DIV b

Integer division (results for non-integer inputs undefined): the number of times a can be divided by b, possibly leaving a remainder.
Example: 7 DIV 4 = 1. Example: 8 DIV 4=2. Example: 9 DIV 4=2.

The above examples deal only with positive integers. But what about negative numbers? There are several ways of handling DIV and MOD (see below) for negative numbers - and they give different results. Numipulator takes the following approach:

a DIV b is a/b rounded down to the nearest integer below (whether a and b are positive or negative).

7 DIV 3 = 2 (2.33 rounded down to 2);
7 DIV -3 = -3 (-2.33 rounded down to -3);
-7 DIV 3 = -3 (-2.33 rounded down to -3);
-7 DIV -3 = 2 (2.33 rounded down to 2).

Mod: a MOD b

Modulo, or integer remainder obtained by subtracting (a DIV b)Xb from a. Results for non-integer inputs are undefined.
Example: 7 MOD 4 = 3. Example: 8 DIV 4=0. Example: 9 DIV 4=1.

a MOD b = a - (a DIV b)Xb in all cases, so

7 MOD 3 = 1 (7-(2X3));
7 MOD -3 = -2 (7-(-3X-3));
-7 MOD 3 = 2 (-7-(-3X3));
-7 MOD -3 = -1 (-7-(2X-3)).

Perm: a!/(a-b)!

Number of permutations of b items from a set of a distinct items (aPb). Results for non-integer inputs and negative numbers are undefined.
Example: 6P2 = 30. This equals 6!/(6-2)! or 6X5

Note: as with factorials generally, these numbers can be very large and may return Infinity or some other error.

Comb: a!/b!(a-b)!

Number of combinations of b items from a set of a distinct items (aCb). Results for non-integer inputs and negative numbers are undefined.
Example: 6C2 = 15. This equals 6!/(2!X(6-2)!) or 6X5/2

Note: as with factorials generally, these numbers can be very large and may return Infinity or some other error.

Random int a->b

The result is a pseudorandom integer between a and b (inclusive).
Example: if a = 1 and b = 4, the result could be 1, 2, 3 or 4
Example: if a = 2 and b = -2, the result could be -2, -1, 0, 1 oe 2. Note: As this can return different results with the same two numbers as inputs, it is not a true function.

Check (1/0): a<b

If a<b, the result is 1, otherwise the result is 0.

Other Check (1/0):....operations are similar. If the check is true, the value 1 results; if not, the value 0 results.

Logic (1/0): a AND b

If both a and b are not zero, the result is 1, otherwise the result is 0.

Logic (1/0): a OR b

If either a is not zero, or b is not zero, or both are not zero, the result is 1, otherwise the result is 0.

Logic (1/0): a XOR b

If one of a or b is zero while the other is not zero, the result is 1, otherwise the result is 0.

Logic (1/0): a NAND b

If both a and b are not zero, the result is 0, otherwise the result is 1.

Logic (1/0): a NOR b

If either a is not zero, or b is not zero, or both are not zero, the result is 0, otherwise the result is 1.

Logic (1/0): a XNOR b

If one of a or b is zero while the other is not zero, the result is 0, otherwise the result is 1.

Index: [a,b] 10 cols

For a table with 10 columns, the result is the index or list position of the item at row a column b.
Example: If a=2 and b=3, the result is 13. Example: If a=1 and b=1, the result is 1

This is designed to be useful when using the 10 column wide default visible area of the Graphics Formatter.

Row: Index a, b cols

For a table with b columns, the result is the row in which the element with index a (the ath element) would be found in that table.
Example: If a=8 and b=5, the result is 2, as the 8th element of the table would be found in row 2.

Col: Index a, b cols

For a table with b columns, the result is the column in which the element with index a (the ath element) would be found in that table.
Example: If a=8 and b=5, the result is 3, as the 8th element of the table would be found in column 3.

Number Function - Row B

These take one number as an input and produce a number as a result. As with Number Operations, the Calculator... and Expression... functions found elsewhere allow more than one function to be applied, and also a mixture of operations and functions.

Square

The number multiplied by itself, i.e. a2. Example: a=3: Result=9. Example: a=-2: Result=4

Square Root

The (non-negative) square root of the number, i.e. a1/2 or √a.
Example: a=4: Result=2. Example: a=10: Result=3.1623.
Example: a=-4: Result=NaN (Not a Number).

+/-: aX-1

Change sign (multiply by -1). Example: a=-5.6: Result=5.6.  Example: a=5.6: Result=-5.6.

Absolute value

If a>=0, then result=a. If a<0, then result=aX-1.
Example: a=-4: Result=4; Example: a=4: Result=4.

Round to nearest int.

Round to the nearest integer. If the decimal fraction = 0.5, round to next highest integer.
Example: a=3.4: Result=3. Example: a=3.5: Result=4. Example: a=3.6: Result=4.
Example: a=-3.4: Result=-3.  Example: a=-3.5: Result=-3. Example: a=-3.6: Result=-4.

Round to 1 dec. pl.

Round to 1 decimal place. Multiply a by 10, round this to nearest integer, then divide by 10.
Example: a=3.44: Result=3.4. Example: a=3.45: Result=3.5. Example: a=3.46: Result=3.5.
Example: a=-3.45: Result=-3.4.

Round to 2 dec. pl.

Round to 2 decimal places. Multiply a by 100, round this to nearest integer, then divide by 100.
Example: a=3.244: Result=3.24. Example: a=3.245: Result=3.25. Example: a=3.246: Result=3.25.
Example: a=-3.245: Result=-3.24.

Nearest int. <= a

Round to the nearest integer less than or equal to the number. (Sometimes called the floor function).
Example: a=3.1: Result=3. Example: a=3.9: Result=3: Example: a=-3.1: Result=-4.
Example: a=-3.9: Result=-4.

Nearest int. >= a

Round to the nearest integer greater than or equal to the number. (Sometimes called the ceiling function).
Example: a=3.1: Result=4. Example: a=3.9: Result=4: Example: a=-3.1: Result=-3.
Example: a=-3.9: Result=-3.

Reciprocal: 1/a

1 divided by a. Example: a=5: Result=0.2. Example: a=0.2: Result=5.

Increment: a+1

Result=a+1.  Example: a=-3. Result=-2. Example: a=3: Result=4.  Example: a=2.5: Result=3.5.

Decrement: a-1

Result=a-1. Example: a=-3. Result=-4. Example: a=3: Result=2. Example: a=2.5: Result=1.5.

Log base 10

Result=logarithm10(a). The relationship is: a=10Result. Example: a=100: Result=2 (since 102=100).

Log base e

Result=logarithme(a). The relationship is: a=eResult. Example: a=2.718281828459: Result=1 (since e1=2.718281828459).

Antilog base 10

Result=10a.  Example: a=2: Result=100.

Antilog base e

Result=ea.  Example: a=1: Result=2.718281828459.

Factorial: a!

The factorial of a number is defined only for non-negative integers, i.e. for 0, 1, 2, 3, 4, etc. The factorial of a where a >= 1 is aXa-1Xa-2......X1.
For example, the factorial of 4 is 4X3X2X1, which is 24.
The factorial of 0 is defined as 1.

Sine (rads), Cosine (rads) and Tangent (rads)

These trigonometric functions generate the sine, cosine and tangent of angles expressed in radians.
Example: sine(0)=0; sine(pi)=0; cosine(pi)=-1; tangent(pi)=0; tangent(0.785398163397)=1.
Note: the tangent of pi/2 should be infinity, but underlying inaccuracies of defining pi mean that it is given as a large finite number.

Arcsine (rads), Arccosine (rads) and Arctangent (rads)

These trigonometric functions generate an angle, expressed in radians, whose sine, cosine, or tangent, respectively, is the input number. The number of solutions to these is infinite; Numipulator takes the single solutions generated by the underlying Javascript mathematical functions.  Note: the inputs for arcsine or arccosine should lie between -1 and +1; other inputs will yield a result of NaN (Not a Number).
Example: arcsine(0)=0; arcsine(1)=1.570796326795 (pi/2); arccosine(-1)=3.14159265359 (pi); arctangent(0)=0; arctangent(1)=0.785398163397 (pi/4).

Sine (degs), Cosine (degs) and Tangent (degs)

These trigonometric functions generate the sine, cosine and tangent of angles expressed in degrees.
Example: sine(0)=0; sine(180)=0; sine(30)=0.5; cosine(180)=-1; tangent180)=0; tangent(45)=1
Note: the tangent of 90 degrees (pi/2 rads) should be infinity, but underlying inaccuracies of defining pi mean that it is given as a large finite number.

Arcsine (degs), Arccosine (degs) and Arctangent (degs)

Identical to arcsine (rads) etc., but the angle generated is expressed in degrees rather than radians.
Example: arcsine(0)=0; arcsine(1)=90; arccosine(-1)=180; arctangent(0)=0; arctangent(1)=45

Check (1/0): Integer

If a is an integer, the result is 1, otherwise the result is 0.

Other Check (1/0):.... functions are similar. If the check is true, the value 1 results; if not, the value 0 results.

Note: For the checks on Prime, Odd, and Even, a non-integer input value always results in the value 0. For the check on Prime, any value < 2 results in the value 0. The value 0 is classed as an Even number in Numipulator (even though some mathematicians class it as neither odd nor even).

Note: the check for a=0 is equivalent to the logic function NOT. If a=0, the result is 1, while if a=1 or any non-zero value, the result is 0.

Note: the check for a<>0 returns 0 if a=0, and 1 if a is non-zero.

Logic (1/0): NOT a

If a is zero, the result is 1, otherwise the result is 0.

Logic (1/0): a

If a is zero, the result is 0, otherwise the result is 1.

Row: Index a, 10 cols

For a table with 10 columns, the result is the row in which the item at position a in the list of items forming the table occurs.
Example: If a=13, the result is 2. Example: If a=1, the result is 1

This is designed to be useful when using the default 10 column visible area of the Graphics Formatter.

Col: Index a, 10 cols is similar but gives the column in which the item at position a occurs.

List Function to Number - Row C

These take a list as input and produce a number as a result. Important: These functions may also be applied to individual rows or columns of a table, using the Line List Functions of Row S.

Sum of list values

Simple addition of all the numbers in the list. Example: la=2, 4, 6, 8: Result=20.
Example: la=L0: Result=0 (i.e. the sum of an empty list is 0).

Product of list values

The result is obtained by multiplying all the numbers on the list together.
Example: la=2, 4, 6, 8: Result=2X4X6X8=384.

Note: the product of an empty list is defined as 1. So, if la=L0, the result=1.

Average (mean)

The result is the sum of the list values divided by the number of items on the list.
Example: la=2, 4, 6, 8: Result=5. Example: la=L0: Result=NaN (0/0).

Maximum value

The result is the maximum value on the list. Example: la=2, -10, 4, 8, 6: Result=8.
Example: la=L0 (empty list): Result=undefined.

Minimum value

The result is the minimum value on the list. Example: la=2, -10, 4, 8, 6: Result=-10.
Example: la=L0 (empty list): Result=undefined.

Range

The result is the maximum value on the list - the minimum value.
Example: la=2, -10, 4, 8, 6: Result=18. Example: la=L0 (empty list): Result=undefined.

Length of list

The result is the number of items on the list. Example: la=2, -10, 4, 8, 6: Result=5.
Example: la=L0 (empty list): Result=0.

First item

The result is the first item on the list. Example: la=2, -10, 4, 8, 6: Result=2.
Example: la=L0 (empty list): Result=undefined.

Last item

The result is the last item on the list. Example: la=2, -10, 4, 8, 6: Result=6.
Example: la=L0 (empty list): Result=undefined.

Random item

The result is one randomly-selected item on the list. Example: la=2, -10, 4, 8, 6: Result=4 (or maybe -10, 8 or 6).
Example: la=L0 (empty list): Result=undefined.

First Quartile

This is the 25th percentile of the input list.

For those not used to percentiles, some explanation is required. Even for those familiar with them explanation is due, since percentiles are defined and implemented differently by different systems.

The pth percentile of a set of numbers is a number such that at least p/100% of the numbers in the set are <= this number, and (100-p)/100% of the numbers are greater than or equal to this number. So, the 25th percentile of a set of numbers is one such that at least 25% of them are <= the number, and at least 75% of them are >= the number.  

For example, given 7 numbers 10, 20, 30, 40, 50, 60, 70, the 25th percentile is 20, since 10 and 20 (2/7 of the total (>25%)) are <=20, and 20, 30, 40, 50, 60, 70 (6/7 of the total (>75%)) are >=20. Note: the two subsets have a total of 8 items, since one item, 20, is included in both subsets.  No other number satisfies these conditions.

To determine the pth percentile of a list containing N numbers, the list is firstly sorted into ascending order. Each number then has a rank or position in the sorted list. The rank of the pth percentile is (N+1)Xp/100. So, for 7 numbers, the 25th percentile is (7+1)X25/100=2. So, the 25th percentile is the second item in the sorted list.

In most cases, the rank of the pth percentile will not be an integer. For 5 numbers, for example, the rank of the 25th percentile is (5+1)X25/100=1.5. In theory, any number > 1st number and < 2nd number would satisfy the conditions. Numipulator, like certain well-known statistical applications, interpolates between the two numbers at the ranks on either side of the non-integer rank, i.e. between the 1st and 2nd numbers in this case. So, if the sorted list were 10, 20, 30, 40, 50, then the 25th percentile would be given as half-way between 10 and 20, i.e. 15. If there were six numbers, 5, 10, 14, 25, 27, 30, then the 25th percentile would be at rank (1+6)X25/100=7/4=1.75. Numipulator would give the result as 5+(0.75X(10-5)=8.75.

If the rank of the pth percentile is less than 1 or greater than N, Numipulator gives the result as undefined (some other applications would produce the minimum and maximum values in these extreme cases).

Median

This is the 50th percentile of the input list. See First Quartile for definition of percentile.

Third Quartile

This is the 75th percentile of the input list. See First Quartile for definition of percentile.

Interquartile Range

This is the 75th percentile - 25th percentile. See First Quartile for definition of percentile.

Variance (N)

If the numbers in a list represent some characteristic of a complete population, the variance is Σ((x-mean)2)/N, where x is a value in the list, mean is the average value of the list, and N is the number of items in the list. That is, the variance is the average of the squares of the deviations from the mean. Variance (N) represents this value.

Variance (N-1)

If the numbers in a list represent some characteristic of a sample of a population, the value given by Σ((x-mean)2)/N, i.e. Variance (N) , gives a biased estimate of the variance of the full population. The unbiased estimate is given by dividing by N-1 instead of N. Variance (N-1) represents this value, which is often known as the unbiased variance.

Standard Dev'n (N)

The standard deviation of a complete population is the square root of the variance ( Variance (N) ).

Standard Dev'n (N-1)

The standard deviation of a sample population is the square root of the variance ( Variance (N-1) or unbiased variance). This is often known as the unbiased standard deviation.

Sum of squares

The result is the sum of the squares of all the numbers. Example: la=2, 3, 4: Result=22+32+42=29

Root Mean Square

The result is the square root of the average of the squares of the numbers, i.e. √(sum of squares/N), where N is the number of items.
Example: la=2, 3, 4: Result=√((22+32+42)/3)=√(29/3)=3.109

Sum:X10^n...X10,X1

If the list has n items in it, the result is item1X10n+item2X10n-1+....10Xitemn-1+itemn.
Example: la=2, 3, 4: Result=234

This is intended to generate an integer from a list of its constituent numerals.

Check (1/0): Ascend

If every item on la <= the following item, if any, the result is 1, otherwise the result is 0. An empty list returns 1.

Check (1/0): Descend

If every item on la >= the following item, if any, the result is 1, otherwise the result is 0. An empty list returns 1.

Check (1/0): Unique

If there are no duplicates on la, the result is 1, otherwise the result is 0. An empty list returns 1.

Check (1/0): L0

If la is an empty list (no items) the result is 1, otherwise the result is 0.

Check (1/0): Not L0

If la is an empty list (no items) the result is 0, otherwise the result is 1.

Case: <

The numbers on the list are taken as parameters of a case statement. The list is best considered in groups of 3, as follows:

a b c
d e f
g h i
j

The meaning is:
if a<b then the result is c else
if d<e then the result is f else
if g<h then the result is i else
the result is j (where j is the default value if none of the other checks succeed).

If no default value is given and none of the specified checks succeeds, the result is undefined.

Any surplus number (e.g. if there were a number k above) is ignored.

Example: Suppose la is given as:
D1 3 101
D1 4 102
D1 5 103
104 105
and D1 has the value 4. The result is 103 as the first two checks fail, but the 3rd one succeeds.

If D1 had the value 7, the result would be the default value 104 (the surplus number 105 is ignored). If the numbers 104 and 105 were removed from la, the result would be undefined in this case, as no checks succeed and there is no default value.

Other Case: ... functions (except Comp) operate similarly, but with a different comparison operator.

Case: Comp

The numbers on the list are taken as parameters of a more complex case statement, where the checks in each can be different. The list is best considered in groups of 4, as follows:

a b c d
e f g h
i

The second item in each group of 4 represents a comparison operator. This should be an integer from 1 through to 6 or, exactly equivalent, 14 through to 19:

1 means <
2 means <=
3 means =
4 means <>
5 means >=
6 means >

14 means <
15 means <=
16 means =
17 means <>
18 means >=
19 means >

Why are there two set of values for these comparison operators when values 1-6 are almost certainly easier to remember? This is because Numipulator includes some built-in input Mappings that you can choose to use. Now, one set of these is for Number Operations, which includes <, <=,...> for numbers 14, 15, ... 19. In order that the same symbols may be used for comparison operators in Case: Comp and related functions, these mappings are also included for simple comparison operations, so it is necessary to use 14-19 as operator values. That is, it ensures that the Number Operation and Comparison Mappings are compatible.

So, the meaning of:
a 1 c d
e 3 g h
(i)
is:
if a<c then the result is d else
if e=f then the result is g else
the result is i (where i is the default value if none of the other checks succeed).

Example: Suppose la is given as:
D1 14 4 101
D1 16 4 102
D1 16 5 103
104

or, if Mappings are defined such that < maps to 14 and 16 maps to =, as
D1 < 4 101
D1 = 4 102
D1 = 5 103
104

This means: if D1 < 4, the result is 101, else if D1 = 4, the result is 102, else if D1 = 5, the result is 103, else the result is 104.

So, if D1 has the value 4. The result is 102 as the first check (D1<4) fails, but the second check (D1=4) succeeds.

The treatment of surplus values and no default value is similar to that for the other Case: functions.

Case: 1st

Like Case: Comp, the numbers on the list are taken as parameters of a complex case statement. The first item on the list is the key number that is involved in every comparison made - always the first item in the comparison. The remainder of the list (i.e. all but the first item) is best considered in groups of 3, as follows:

b c d
f g h
(i)

The first item in each group of 3 represents a comparison operator. This should be an integer from 1 through to 6 or from 14 through to 19 (as for Case: Comp above):

To understand the meaning of this, place the key number at the beginning of each group of 3 to make a group of 4. The meaning is then identical to Case: Comp above.

Example: Suppose la is given as:
D1
14 4 101
16 4 102
16 5 103
104

This means: if D1 < 4, the result is 101, else if D1 = 4, the result is 102, else if D1 = 5, the result is 103, else the result is 104.

So, if D1 has the value 4. The result is 102, as with the Case: Comp example above.

The treatment of surplus values and no default value is similar to that for the other Case: functions.

Calculator

As with the various Case... functions, the input to this is a combination of numbers and operator codes: codes representing Number Operations, e.g. +, -, x and /. The codes that represent the number operations are as given in the list of codes (from pressing the Codes link above the Information Zone). So, 1 means add, 2 means subtract, 3 means multiply and 4 means divide, for example.

The input list, la, starts with a number, which is followed by any number of operator code and number pairs, i.e. number, operator code, number, operator code, number... The first three represent an operation. The result of this feeds into the next operation, and so on. So, a list beginning 2,3,5, which means 2 x 5 and yields the result 10, becomes the first argument of any next pair. So, the input list 2,3,5,2,4,3,10 yields the result 60, as they represent the expression (((2 x 5) - 4) x 10).

This is called the Calculator function because it resembles the operation of a calculator, where the result of the first operation becomes the first input of the next operation. Reminder: 2 + 4 x 5 gives the result 30, i.e. (2 + 4) x 5, not 22, i.e. 2 + (4 x 5), which would be the expected result using normal operator precedence. With this Calculator function, all operators have the same precedence, so evaluation is simply left to right.

It can be useful to specify Mappings as follows to allow more readable input lists:
+ 1 - 2 x 3 / 4 % 5 and so on - as given by the +-x- button below the Mappings field.

The input list 2,3,5,2,4,3,10 can then be input as 2 x 5 - 4 x 10, still giving the result 60.

This function clearly enables you to specify more complex calculations than a single Number Operation.

The Calculator function can also include number functions as well as number operations. The approach to incorporating these is quite simple. It makes use of a mock operator code, 100, to specify that a function is being used, followed by a number function code (again obtained from the Codes link at the top).

So, the sequence 3 100 1 yields the result 9, as 1 is the code for the Square function operator, so that this means 3 squared. Likewise, the sequence 1 1 3 100 2 100 10 yields the result 0.5, as 1 1 3 means 1+3, i.e. 4, and 100 2 means apply the function Square Root, so gives the result 2, and then 100 10 means apply the function Reciprocal (1 divided by the input), so the final answer is 1/2 or 0.5.

As with number operators, such sequences can be made much more readable by using text to map to these codes. So, using the following additional mappings: f 100 Square 1 Root 2 Reciprocal 10, this number sequence can be written as 1 + 3 f:Root f:Reciprocal (using : as the separator between the f and the function name), again giving the answer 0.5.

Expression

The input to this is the same as the Calculator function above, i.e. number, operator code, number, operator code, number, etc., including the number function codes as discussed above, with the meanings of the operator codes the same. The difference is that conventional operator precedence is used for the main operators (+, -, *, / and ^ (power)), as in the BODMAS/PEMDAS convention. With this, any power operations are evaluated first, followed by any multiplication or division operations, and then any addition or subtraction operations. With this convention, 2 + 3 x 12 / 2 ^ 2 has the meaning (2 + ((3 x 12) / (2 ^ 2))) and evaluates to 2 + (36 / 4) = 11. The same expression with Calculator precedence means (((2 + 3) x 12) / 2) ^ 2, which evaluates to ((5 x 12) / 2) * 2 or 30 ^ 2 = 900. Any sequential operators of the same precedence are evaluated from left to right.

Now, there are many more operators in Number Operation than these, including ones beginning Check (1/0) and Logic (1/0). Apart from Check..., Logic..., Add, Subtract and Power, these all involve multiplication or division, so these have the same precedence as Multiply and Divide. Overall, the precedence of the operators is as follows:

Power (^) and all number functions
Multipy (x), Divide (/) and the remaining operators, such as DIV and MOD, not mentioned elsewhere
Add (+) and Subtract (-)
Check (1/0) (all of them the same precedence)
Logic (1/0) AND, NAND
Logic (1/0) OR, NOR, XOR, NXOR

This allows complex expressions to be specified. Again, it can be useful to specify Mappings to allow more readable input lists, as for Calculator.

It is important to realize that Expression does not give you full expressive power, as no brackets/parentheses are available. So, to specify complicated expressions, you may need to use two or more Expression or Calculator functions.

SList functions

The following functions are all concerned with SLists only. They all take an SList as an input. The example SList for each function is la=2 27 28 0 4 29 30 31 32. Note: this has 3 "sublists".

SList: head length

Given an SList as an input, the output is the length of the content of the first "sublist" within the SList.
The result for the example=2, as the first "sublist" is 27 28.

SList: length

Given an SList as an input, the output is the number of "sublists" within the SList.
The result for the example=3, as there are 3 sublists.

Measure Conversion - Row F

The result is list of the selected conversions for each of the numbers on the input list [a]. For example, if the selected conversion is foot->metre and the input list, [a], is 2, 3, 4, then the result is 0.6096, 0.9144, 1.2192. 

Notes: Some conversions for cases where the input or output is not a simple number, e.g. ft and inches to cm or vice versa, can be found in the Formula numipulation box.

Notes on units:

Many of these conversions are between metric/SI units and Imperial (sometimes used in the U.K. and some other countries) or U.S. measures. Sometimes, Imperial and U.S. measures with the same name are different. They are distinguished here by Imp or US. When measuring volumes, the U.S. measures differ according to whether measuring dry materials or wet materials (i.e. liquids). Only U.S. wet measures are given here (and are noted as US wet).

Both the U.S. and Imperial systems employ short tons and long tons. A short ton is 2000lb; a long ton is 2240lb. However, traditional usage is for 'ton' alone to refer to 2000lb in the US, and to 2240lb in countries using Imperial measures. So, ton(US)=2000lb; ton(Imp)=2240lb.  The hundredweight (cwt) is 1/20 of the respective ton. A tonne, also known as a metric ton, equals 1000kg.

The abbreviation ft-pndal means foot-poundal (a poundal is a U.S./Imperial measure of force).

A calorie has several definitions (close but slightly different values). The International Table (IT) value is defined here. The term Calorie (upper-case C) is also widely used, particularly when discussing nutrition and exercise. 1 Calorie = 1000 calories or 1kilocalorie (1kcal).

Like the calorie, the British Thermal Unit (BTU) has several definitions (close but slightly different values). The International Table (IT) value is defined here.

There are seven measures associated with dates and days:

  • Date: This is an 8-digit integer of form YYYYMMDD. For example, 20060405 is used to represent the date 5 April 2006. This format ensures that dates will sort into chronological order.
  • Day Integer: Each date is associated with an integer. Day 0 is 1 January 1970. Day 1 is 2 January 1970. Day -1 is 31 December 1969, and so on.  
  • Year: The full year, e.g. 1973 or 2006.
  • Month: A number, 1-12, where 1=January and 12=December.
  • Day(1-31): Day of month (1-31).
  • Day(1=Sun): Each day of the week is numbered 1 through to 7. In this format, 1=Sunday and 7=Saturday (typical North American style).
  • Day(1=Mon): Each day of the week is numbered 1 through to 7. In this format, 1=Monday and 7=Sunday (typical European style).

There are conversions to allow you to convert from Date to Day Integer, Day Integer to Date, and Date to Year, Month, Day(1-31) and both forms of weekday numbering. So, Date 20060405 converts to Day Integer 13242. Using these conversions, you can easily calculate the length, in days, between two dates.

Note: the Day Integers used in Numipulator, being based around Javascript, may differ from those in other packages.

There are also many conversions that allow you to convert from so many of a given quantity (e.g. Million, Dozen), or from a unit with an SI prefix (e.g. kilo-, milli-) to individual units. So, if [a] had the value 2, 2.5 and the selected conversion were Dozen 12 then the result would be 24, 30. If the selected conversion were kilo- k (10^3) then the result would be 2000, 2500.

Note: With the default rounding of 12 decimal places, conversions from small SI prefixes, such as atto- and femto-, may give the result 0. Ensure you use the Internal rounding when handling very small numbers.

Note: Different countries or traditions use the same term to mean a different number. For example, a billion may mean 109 (a thousand million) or 1012 (a million million). Most English-speaking countries, including U.S.A. and U.K., now take billion to mean 109, whereas most other countries take it to mean 1012. The two sets of meanings are called Short Scale (billion=109) and Long Scale. Both are given here, so be sure to use the correct one.

List Generation - Row G

All the list generation operations let you generate lists of numbers, based on parameters in the input list. Some operations require one parameter, some two or more parameters. In all cases, more than one set of parameters may be entered; the list generated for the second and subsequent sets of parameters is joined to the end of the list for the first set of parameters. 

Note: In all cases, if a certain number of items to be generated must be specified, the number must be an integer. Similarly, if generating integers within some range, the range limits must themselves be integers. If these numbers are not integers, the result is undefined.

p1 items of value p2

Generates p1 occurrences of the number p2.

Example: parameters=4, 3.5: Result=3.5, 3.5, 3.5, 3.5.
Example: parameters=4, 3.5; 3, 9, 2: Result=3.5, 3.5, 3.5, 3.5, 9, 9, 9 (the extra parameter, 2, is ignored).

Integers p1->p2

Generates all integers between integers p1 and p2 (inclusive).

Example: parameters=4, 8: Result=4, 5, 6, 7, 8.
Example: parameters=4, 8;   2, -2: Result=4, 5, 6, 7, 8, 2, 1, 0, -1, -2

Vals p1->p2 inc by p3

Generates a list, starting at p1, in which all subsequent values differ from the previous one by p3. If the next number to be generated is greater than p2 (if p3 is positive) or is less than p2 (if p3 is negative), the number is not included and generation stops. p1 is always included in the list.
Example: parameters=3, 10, 2: Result: 3, 5, 7, 9.
Example: parameters=3, -5, -2: Result: 3, 1, -1, -3, -5. Example: parameters=3, -5, 2: Result=3
Example: parameters=3, 10, 2, 3, -5, -2: Result=3, 5, 7, 9, 3, 1, -1, -3, -5

p1 vals, start p2, inc p3

Generate a list containing p1 items, starting at value p2, where subsequent values differ from the previous one by p3.
Example: parameters=5, 4, 2: Result=4, 6, 8, 10, 12.
Example: parameters=5, 4, -2: Result=4, 2, 0, -2, -4

p1 pairs: p2 & p3

Generate a list containing p1 pairs of the values p2 and p3.
Example: parameters=3, 1, 2: Result=1, 2, 1, 2, 1, 2.

p1 random ints 1->p2

Generates a list with p1 items, each being a pseudo-random number between 1 and p2 (an integer) inclusive.
Example: parameters=5, 6: Result=4, 3, 6, 1, 6.
Example: parameters=5, 6; 3, 12: Result=2, 2, 3, 6, 4, 1, 10, 7
Example: parameters=5, -4: Result=-2, 1, 0, -4, -2. All these examples give illustrative results.

p1 random ints p2->p3

Generates a list with p1 items, each being a pseudo-random number between integers p2 and p3 inclusive.
Example: parameters=5, 6, 9: Result=7, 6, 9, 7, 8.
Example: parameters=5, 6, 9; 3, 12, 9: Result=9, 7, 8, 6, 9, 9, 12, 10
Example: parameters=5, -4, 4: Result=-2, 1, 0, 3, -2. All these examples give illustrative results.

Dates p1->p2

Generates all dates between integers p1 and p2 (inclusive). The two dates, p1 and p2, must be integers representing a Date as follows: an 8-digit integer of form YYYYMMDD. For example, 20060405 is used to represent the date 5 April 2006. The results will also be integers representing dates in this format.

Example: parameters=20050227, 20050302: Result=20050227, 20050228, 20050301, 20050302.
Example: parameters=20050302, 20050227: Result=20050302, 20050301, 20050228, 20050227.

Primes p1->p2

Generates prime numbers between the given non-negative integers (inclusive). A prime number is a positive integer that has exactly two positive integer factors, 1 and itself.

Note: if either p1 or p2 are not positive integers, the result is undefined.
Note: if p1 > p2, the list of prime numbers is given in descending order.
Note: 1 is not considered a prime number, as it does not have two different positive integer factors.

Example: parameters=1, 20: Result=2, 3, 5, 7, 11, 13, 17, 19.
Example: parameters=20, 1: Result=19, 17, 13, 11, 7, 5, 3, 2
Example: parameters=-2, 2: Result=undefined

Prime factors of p1

Generates a list of prime factors for number p1. This list, which is always ordered in ascending order, is a list of prime numbers that, when multiplied together, result in the number p1. Note: this list can contain duplicates of numbers, e.g. the prime factors of 4 are 2, 2.

Prime factors are defined only for positive integers - the result for all other numbers is undefined.

Example: parameters=6: Result=2, 3
Example: parameters=275: Result=5, 5, 11
Example: parameters=3761: Result=3761 (as 3761 is a prime)
Example: parameters=1: Result=L0 (1 is a positive integer that has no prime factors, since 1, its only factor, is not a prime number.)
Example: parameters=275, 6: Result=5, 5, 11, 2, 3 (the lists for each number are joined together)

Numerals of p1

Generates a list of the numerals found in the number p1. Non-numeric characters, such as -, ., E, are ignored.

Example: parameters=64502, 19: Result=6,4,5,0,2,1,9
Example: parameters=0.123: Result=0,1,2,3
Example: parameters=14, -232: Result=1,4,2,3,2

R:Indices p1->p2,p3 col

The parameters p1 and p2 are positive integers representing the start and end indices in a list of numbers. If this list were laid out in a table with p3 columns, then the result is a list of the row numbers in which these items would be found.

Example: parameters=3,7,5: Result=1,1,1,2,2
Explanation: Place the indices 1->n in a table with 5 columns (as p3=5):
1 2 3 4 5
6 7 8 ....
The indices 3->7 are found respectively in rows 1,1,1,2,2

Example: parameters=7,3,5: Result=2,2,1,1,1 - the reverse of the first example

Example: parameters=8,8,5: Result=2 - returns the row number for index 8

Use: to convert a list index into a table row.

C:Indices p1->p2,p3 col

Similar to the previous one, but the column numbers are returned. Using the same first example, the result would be: 3,4,5,1,2

Example: parameters=8,8,5: Result=3 - returns the column number for index 8

I:[p1,p2]->[p3,p4],p5 col

The parameters p1 and p2 are positive integers representing the row and column numbers of some position in a table with p5 columns, while p3 and p4 represent the row and column numbers of some other item. The result is the list indices of all the items from the first to the second item inclusive.

Example: parameters=1,3,2,2,5: Result=3,4,5,6,7
Explanation: Place the indices 1->n in a table with 5 columns:
1 2 3 4 5
6 7 8 ....
The item at row 1 column 3 has the index 3 while that at row 2 column 2 has the index 7

Example: parameters=2,2,2,2,5: Result=7 - just a single index returned as the start and end items are the same.

p1 (p2<p3:p4 else p5)

The result is p1 occurrences of the result of the if-then-else statement: if p2<p3 then the result is p4, else the result is p5.

Example: parameters=2,D1,4,101,102 and D1=3: Result=101,101
Explanation: As D1<4 the result is 101, and there are two occurrences of this.

p1 (p2<=p3:p4 else p5) and the others with different comparison operators function similarly.

p1 Func p2(p3)

The result is p1 occurrences of the result of the number function with code p2 operating on the number p3.

Number functions have a unique code, which can be seen by pressing the Codes Display link near the top of the main Numipulator page. The beginning of this list is
1 Square
2 Square Root
3 +/-: aX-1
4 Absolute value

Example: parameters=3,1,6: Result=36,36,36
Explanation: p2=1, the code for Square. So, the result is 3 occurrences of the square of 6.

Use: This meta-level operation allows you to select the function to be applied - particularly useful if developing your own Numiplets. For example, you might allow input of an angle either in radians or in degrees; code p2 could be set as 18 or 21 to return the sine of the angle - no need to use two numipulation boxes to produce both results.

p1 Op p2(p3, p4)

The result is p1 occurrences of the result of the number operation with code p2 operating on the numbers p3 and p4.

Number operations have a unique code, which can be seen by pressing the Codes Display link near the top of the main Numipulator page. The beginning of this list is
1 Add: a+b
2 Subtract: a-b
3 Multiply: aXb
4 Divide: a/b
5 %: aXb/100
6 % add: a+(aXb/100)

Example: parameters=1,3,6,4: Result=24
Explanation: p2=3, the code for Multiply... So, the result is a single occurrence of the result of 6X4.

p1 If p2(p3,p4,p5,p6)

The result is p1 occurrences of the result of the if-then-else statement: if the comparison (p2) between p3 and p4 is true then the result is p5, else the result is p6, where the comparison to be carried out is defined by the parameter p2, which should specify a comparison code, 1 to 6 (or 14 to 19). The comparison codes can be seen by pressing the Codes Display link near the top of the main Numipulator page.

Example: parameters=2,1,D1,4,101,102 and D1=3: Result=101,101
Explanation: The comparison code (p2) is 1, which signifies the < comparison. As D1<4 the result is 101, and there are two occurrences of this.

Series:p1 Op p2(p3, p4)

The result is a list of p1 items, where the first is the result of the number operation with code p2 operating on the numbers p3 and p4, as given above for p1 Op p2(p3, p4) .

The second item in the results list is the result of the number operation with code p2 operating on the first item in the results list and p4.

More generally, for any value of n > 1, the nth item in the results list is the result of the number operation with code p2 operating on the n-1th item in the results list and p4. This allows the generation of a series of related items.

Example: parameters=3,4,1,2: Result=0.5,0.25,0.125
Explanation: p2=4, the code for Divide... So, the first item in the results list is 1/2 or 0.5. The second is 0.5/2 or 0.25, and so on.

Example: parameters=4,3,1,2: Result=2,4,8,16
Explanation: p2=3, the code for Multiply... So, the first item in the results list is 1X2. The second is 2X2 or 4, and so on. The nth item in the results list in this example is 2n

Example: parameters=3,6,10000,5: Result=10500,11025,11576.25
As p2=6, the code for % add: a+(aXb/100) , the results are the values at the end of years 1, 2 and 3 of an investment of 1000 with 5% compound interest.

List Function to List - Row H

Important: The Table Function functions can also be used for simple lists, by setting the number of columns to 1.

Important: These functions may also be applied to individual rows or columns of a table, using the Line List Functions of Row S.

Sort (ascending)

Sort the list into ascending numerical order. Example: la=3, 2, 4, 5, 1, 3: Result=1, 2, 3, 3, 4, 5

Sort (descending)

Sort the list into descending numerical order. Example: la=3, 2, 4, 5, 1, 3: Result=5, 4, 3, 3, 2, 1

Reverse

Example: la=3, 2, 4, 5, 1, 3: Result=3, 1, 5, 4, 2, 3

Remove duplicates

If a number occurs more than once on the list, the 2nd and subsequent occurrences of the number are removed from the list.
Example: la=3, 2, 4, 5, 1, 3, 2, 6, 0, 6: Result=3, 2, 4, 5, 1, 6, 0

Cumulative sum

This generates a list with the same length as the input list. The value of the number at position n on the result list is the sum of all the numbers on the input list from positions 1 through to n inclusive.
Example: la=3, 2, 4, 5, 1: Result=3, 5, 9, 14, 15.

Cumulative product

This generates a list with the same length as the input list. The value of the number at position n on the result list is the product of all the numbers on the input list from positions 1 through to n inclusive.
Example: la=3, 2, 4, 5, 1: Result=3, 6, 24, 120, 120.

Diffs: item-next

This generates a list whose length is the same as the input list.

The value at position n in the result list is the value at position n on the input list minus the value at position n+1. The last value on the input (which has no item after it) is returned as the last item on the result list.
Example: la=3, 2, 4, 5, 1: Result=1, -2, -1, 4, 1.
Example: la=3: Result=3.

Note: If the Cumulative sum is found for list L, and this result is then reversed and used as the input to Diffs: item-next, the result is the reverse of list L.

Divisions: item/next

This generates a list whose length is the same as the input list.

The value at position n in the result list is the value at position n on the input list divided by the value at position n+1. The last value on the input (which has no item after it) is returned as the last item on the result list.
Example: la=12, 4, 2: Result=3, 2, 2.
Example: la=3: Result=3.

Note: If the Cumulative product is found for list L, and this result is then reversed and used as the input to Divisions: item/next, the result is the reverse of list L.

All but first

The result is the input list but with the first item removed. The result is undefined if the input list is empty.
Example: la=3, 2, 4, 5, 1: Result=2, 4, 5, 1.

All but last

The result is the input list but with the last item removed. The result is undefined if the input list is empty.
Example: la=3, 2, 4, 5, 1: Result=3, 2, 4, 5.

Permutation

The result is a permutation of the input list. Note: although under List Function to List, this is strictly not a function as the input does not uniquely determine the output.
Example: la=1, 2, 2, 3, 4, 5: Result=2, 1, 5, 4, 2, 3 or 5, 2, 3, 4, 1, 2 or any other permutation of the input items.

Ranks (ascending)

Produces the ranks associated with each item on the list when the list has been sorted into ascending numerical order. If several items are the same, then the ranks associated with these items will also be the same.

Example: la=30, 20, 40, 50, 10, 30: Result=3, 2, 5, 6, 1, 3 (Note: as there are two identical items (30) ranked 3rd lowest, there is no item ranked 4; the next highest item (40) is ranked 5.

Ranks (descending)

Produces the ranks associated with each item on the list when the list has been sorted into descending numerical order. If several items are the same, then the ranks associated with these items will also be the same.

Example: la=30, 20, 40, 50, 10, 30: Result=3, 5, 2, 1, 6, 3 (Note: as there are two identical items (30) ranked 3rd highest, there is no item ranked 4; the next lowest item (20) is ranked 5.

Frequency table

Produces a list consisting of each value that occurs on la followed by the number of occurrences (frequency) of this value on la. The values are in ascending order of the values on la. The result is best considered as a table with two columns.

Example: la=30, 20, 40, 20, 10, 20, 30: Result= 10, 1, 20, 3, 30, 2, 10, 1. Considered as a table with two columns this is:
10 1
20 3
30 2
40 1

Adjacency table

Produces a list consisting of the next different value on la (starting at the first) followed by the number of occurrences of this value before a different value is found. The result is best considered as a table with two columns.

Example: la=30, 30, 40, 20, 20, 20, 30: Result= 30, 2, 40, 1, 20, 3, 30, 1. Considered as a table with two columns this is:
30 2
40 1
20 3
30 1
i.e. the list consists of 2 30s followed by 1 40 followed by 3 20s and lastly 1 30.
Example: la=L0: Result=L0.

Case list

The description of this function should be read in combination with the Case: Comp function of List Function to Number.

As with the Case: Comp function, the numbers on the input list (la) generally represent Number, Comparison Operator Code, Number, Result, Number, Comparison Operator Code, Number, Result ... Default etc. However, if a zero (0) is encountered when an operator code is expected, this signifies the end of one group of inputs and the start of the next. So, the input list of values 2 1 2 3 4 5 8 9 10 0 2 3 2 4 5 represents two groups:

2 1 2 3 4 5 8 9 10
2 3 2 4 5

with a meaning:

if 2 < 2 then 3 else if 4 > 8 then 9 else 10;
if 2 = 2 then 4 else 5

The result is the list of the results of each of these individual Case: Comp operations, as determined by the Case: Comp function:

10,4

Note: For this to work, there must be a default value just before any 0 used as a group separator.

Calculator list

The description of this function should be read in combination with the Calculator function of List Function to Number.

As with the Calculator function, the numbers on the input list (la) generally represent Number, Operator Code, Number, Operator Code, Number etc. However, if a zero (0) is encountered when an operator code is expected, this signifies the end of one group of inputs and the start of the next. So, the input list 2 1 3 3 5 0 7 3 2 0 5 3 6 2 6 represents three groups with the following meanings:

2 + 3 x 5
7 x 2
5 x 6 - 6

The result is the list of the results of these individual Calculator operations, as determined by the Calculator function:

25, 14, 24

Expression list

This works the same way as Calculator list above, except that the groups separated by the 0s are evaluated as for the Expression function of List Function to Number. So, the input list 2 1 3 3 5 0 7 3 2 0 5 3 6 2 6 represents three groups with the following meanings:

2 + 3 x 5
7 x 2
5 x 6 - 6

The result is the list of the results of these individual Expression operations, as determined by the Expression function:

17, 14, 24

Smash row/col 100

This is concerned with taking pairs of numbers in a list that represent the row and column numbers of cells in a table and producing a single integer for each pair that shows both the row number and cell number smashed together. So, if the numbers in a pair are 25 13, the integer generated will be 2513. The 100 in the name represents the number by which the row number is multiplied, to which the column number is added, i.e. 25x100+13, in this case. Note: if either number is not an integer or is < 1, the value generated is undefined. This is also true if the column number >= 100. Note: if the number of items in the list is odd, the last number is ignored.

This can be useful as it enables handling of individual numbers rather than pairs of numbers, while enabling the row and column numbers to be clearly visible still.

Example: if la = 23 45 61 3 2 19, the result is 2345 6103 219
Example: if la = 23 45 61 3 14 106 2 19 10, the result is 2345 6103 undefined 219, as 106 >= 100; also, the final 10 is ignored.

Smash row/col 1000

This is similar to Smash row/col 100 above, but the multiplier for the row number is 1000 instead of 100. This makes it suitable for tables having between 100 and 999 columns, as well as those with fewer columns. Example: if la = 23 45 61 3 14 106 2 19, the result is 23045 61003 14106 2019.

Unsmash row/col 100

This takes a list of integers representing row and column numbers smashed together using the multiplier 100 (see above) and produces a pair of numbers (row and column number) for each integer. Example: if la = 2345 6103 219, the result is 23 45 61 3 2 19

Note: Numbers < 1 or non-integers generate a pair of undefined values.

Unsmash row/col 1000

This takes a list of integers representing row and column numbers smashed together using the multiplier 1000 (see above) and produces a pair of numbers (row and column number) for each integer. Example: if la = 23045 61003 2019, the result is 23 45 61 3 2 19

Note: Numbers < 1 or non-integers generate a pair of undefined values.

Shift right

Assuming the list la is written from left to right, the numbers in the list are shifted one place to the right, with the last item becoming the first.
Example: if la = 1 2 3, the result is 3 1 2
Example: if la is empty, the result is also empty.

Shift left

Assuming the list la is written from left to right, the numbers in the list are shifted one place to the left, with the first item becoming the last.
Example: if la = 1 2 3, the result is 2 3 1
Example: if la is empty, the result is also empty.

All shifts right

The Shift right function above is applied to la, and then to this result, and so on (for as many times as there are items on the list) until the result of the Shift right is the same as the initial la. All these results are joined together.
Example: if la = 1 2 3, the result is 3 1 2 2 3 1 1 2 3. Why? 1 2 3 shifted right is 3 1 2. 3 1 2 shifted right is 2 3 1, and finally 2 3 1 shifted right is 1 2 3.
Example: if la is empty, the result is also empty.

This may prove useful for producing certain graphical patterns.

All shifts left

Like All shifts right above, but applying the Shift left function.
Example: if la = 1 2 3, the result is 2 3 1 3 1 2 1 2 3.

SList functions

The following functions are all concerned with SLists only. They all take an SList as an input. The example SList for each function is la=2 27 28 0 4 29 30 31 32. Note: this has 3 "sublists".

SList: head content

This returns the contents of the first "sublist" of the input. The result for the example is 27 28.

SList: tail

This returns an SList that is the remainder of the SList once the first "sublist" has been removed. The result for the example is 0 4 29 30 31 32.

SList: contents lengths

This returns a list of all the lengths of each "sublist" in the SList. The result for the example is 2 0 4.

SList: reverse

This returns a new SList, where the order of all the "sublists" is reversed. Note: the contents of each "sublist" are not reversed. The result for the example is 4 29 30 31 32 0 2 27 28.

List Operation - Row J

A List Operation has two inputs: an input list, la, and a set of parameters, p1,p2... p1,p2... ... .

Some of the operations require one parameter (p1), some two (p1 and p2); this will be clear from the operation names, which always refer to the parameters.

In all cases, more than one set of parameters may be entered; the final result list consists of the results for the first set of parameters, followed by those for the second set, and so on.

Item p1

Result is the number found at the p1th position on la.
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9; parameters (p1)=4; Result=6 (the 4th item on the list).
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9; parameters (p1)=4, 5, 6, 4; Result=6, 9, 11, 6.

First position of p1

Finds the first position in which the number p1 is found on la. Returns 0 if it is not found.
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9.
If parameters (p1)=4, Result=1.
If parameters (p1)=11, Result=6.
If parameters (p1)=8, Result=0.
If parameters (p1)=4, 11, 8: Result=1, 6, 0

p1th Percentile

Returns the p1th percentile of list la (see First Quartile for definition of percentile)
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=25, 50, 75: Result=4, 9, 12

Item at rank p1 (asc)

The input list is sorted into ascending order; the result is the p1th item on the sorted list.
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=2: Result=3 (i.e. the second lowest number)

Item at rank p1 (desc)

The input list is sorted into descending order; the result is the p1th item on the sorted list.
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=2: Result=13 (i.e. the second highest number)

Count items = p1

Returns a count of the number of occurrences of p1 on la
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=2, 9, 11, 14, 2: Result=1, 2, 2, 0, 1

Ratio: la length/p1

Returns the length of (number of items in) la divided by p1
Example: la=11, 12, 13, 14, 15, 16;
If parameters (p1)=2: Result=3

Note: if la represents the values in a table, then if p1 is the number of columns in the table, then the result is the number of rows, and vice versa.

Check (1/0): p1 on la

If p1 occurs on list la, the result is 1, otherwise the result is 0.

Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=2, 9, 11, 14, 2: Result=1, 1, 1, 0, 1

Sum: items p1->p2

The result is the sum of the list of items found at positions p1 through to p2 on la.
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1, p2)=4, 7; Result=37 (=6+9+11+11).
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1, p2)=7, 4; Result=37.
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1, p2)=4, 7, 9, 10; Result=37, 25.
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1, p2)=4, 13; Result=undefined (as there is no position 13).

Product: items p1->p2

The result is the product of the list of items found at positions p1 through to p2 on la. The behaviour is similar to that for Sum:... above

Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1, p2)=4, 7; Result=6534 (=6X9X11X11).

List: initial p1 items

The result is the list of the first p1 items found on la.

Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=4; Result=4, 2, 3, 6.

Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=0; Result=L0.

Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=13; Result=undefined.

List: all but initial p1 items

The result is the list of all items found on la except for the first p1 items.

Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=4; Result=9, 11, 11, 16, 12, 13, 9.

List: final p1 items

The result is the list of the last p1 items found on la.

Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=4; Result=16, 12, 13, 9.

Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=0; Result=L0.

Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=13; Result=undefined.

List: all but final p1 items

The result is the list of all items found on la except for the last p1 items.

Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1)=4; Result=4, 2, 3, 6, 9, 11, 11.

List: items p1->p2

The result is the list of items found at positions p1 through to p2 on la.

If p1 is greater than p2 then the items are also returned in reverse order.

Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1, p2)=4, 7; Result=6, 9, 11, 11.
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1, p2)=7, 4; Result=11, 11, 9, 6.
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1, p2)=4, 7, 9, 10; Result=6, 9, 11, 11, 12, 13.
Example: la=4, 2, 3, 6, 9, 11, 11, 16, 12, 13, 9;
If parameters (p1, p2)=4, 13; Result=undefined (as there is no position 13).

List: insert item p1 @p2

The result is the list la with an additional item, value p1, inserted at position p2. p2 may be any position of la or one more than the length of la (in which case the p1 is inserted at the end of the list). The length of the resulting list is one more than that of la.

Example: la=11, 12, 13, 14; parameters (p1, p2)=7.9, 3; Result=11, 12, 7.9, 13, 14.
Example: la=11, 12, 13, 14; parameters (p1, p2)=7.9, 5; Result=11, 12, 13, 14, 7.9.
Example: la=L0; parameters (p1, p2)=7.9, 1; Result=7.9.
Example: la=11, 12, 13, 14; parameters (p1, p2)=7.9, 6; Result=undefined.

List: subst. item p1 @p2

The result is the list la with the item at position p2 replaced by the value p1. The length of the resulting list is the same as that of la.

Example: la=11, 12, 13, 14; parameters (p1, p2)=7.9, 3; Result=11, 12, 7.9, 14.
Example: la=11, 12, 13, 14; parameters (p1, p2)=7.9, 5; Result=undefined.

List: del. item @p1

The result is the list la with the item at position p1 removed. The length of the resulting list is one less than that of la.

Example: la=11, 12, 13, 14; parameters (p1)=3; Result=11, 12, 14.
Example: la=11; parameters (p1)=1; Result=L0.
Example: la=11, 12, 13, 14; parameters (p1)=5; Result=undefined.

Example: la=11, 12, 13, 14; parameters (p1)=1, 2, 3; Result=12, 13, 14, 11, 13, 14, 11, 12, 14.
The last example is a reminder that all these functions may take more than one set of parameters, with the results all joined together, even though you may not find a use for more than one set of parameters.

List: del. p1 items @p2

The result is the list la with p1 items, starting at position p2, removed. The length of the resulting list is p1 less than that of la.

Example: la=11, 12, 13, 14; parameters (p1, p2)=2, 2; Result=11, 14.
Example: la=11, 12, 13, 14; parameters (p1, p2)=1, 3; Result=11, 12, 14.
Example: la=11, 12, 13, 14; parameters (p1, p2)=4, 1; Result=L0.
Example: la=11, 12, 13, 14; parameters (p1, p2)=4, 2; Result=undefined.

List: shift by p1

The result contains the same items as la, but the positions of the items are shifted by p1 towards the front of the list, with items dropping off the beginning of the list being moved to the end of the list. The value of p1 must be an integer, but may be positive or negative.

Example: la=10,20,30,40,50; parameters (p1, p2)=1; Result=20,30,40,50,10.
Example: la=10,20,30,40,50; parameters (p1, p2)=2; Result=30,40,50,10,20.
Example: la=10,20,30,40,50; parameters (p1, p2)=-1; Result=50,10,20,30,40.

List: map to p1 blocks

The result for a given value of p1 is a list the same length as la, where each item on la is mapped to an integer (1 -> p1) based on its value. These integers represent value ranges (or blocks): p1 equal-sized ranges from the minimum value on la to the maximum value. This is useful when you wish to plot a list of numbers on a graph.

To explain further, if Min is the minimum value on la, and Max the maximum value, p1 block beginnings are defined, spaced out at increments of (Max-Min)/p1, starting at Min. So, if Min is 10, Max is 50, and p1 is 10, there will be 10 block beginnings: 10, 14, 18, 22, 26, 30, 34, 38, 42, 46. Any number on la >=10 (and < 14) will be mapped to 1; any number on la >=14 (and < 18) will be mapped to 2, and so on. Note: any number on la >= 46 and <=50 (rather than < 50) will be mapped to 10.

Example: la=4, 2, 3, 6, 18, 24, 9, 11, 11, 16, 12, 13, 9, 18, 22; parameters (p1, p2)=10;
Result= 1, 1, 1, 2, 8, 10, 4, 5, 5, 7, 5, 6, 4, 8, 10
Example: la=4, 2, 3, 6, 18, 24, 9, 11, 11, 16, 12, 13, 9, 18, 22; parameters (p1, p2)=5;
Result= 1, 1, 1, 1, 4, 5, 2, 3, 3, 4, 3, 3, 2, 4, 5

Note: if la is empty an error message results. If each item on la has the same value, so that blocks cannot be determined, all items are mapped to 1. If p1 is not a positive integer, the result is undefined.

List: p1 occurrences of la

The result is the list la repeated for a total of p1 times.
Example: la=1, 2, 3; parameters (p1)=4;
Result= 1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3

SList functions

The following functions are all concerned with SLists only. They all take an SList as an input. The example SList for each function is la=2 27 28 0 4 29 30 31 32. Note: this has 3 "sublist" items.

SList: item p1 length

The result of this is the length of the "sublist" at position p1.
Example parameters (p1)=3; Result=4
Example parameters (p1)=1, 2, 3; Result=2, 0, 4

SList: item p1 content

The result of this is the content of the "sublist" at position p1.
Example parameters (p1)=3; Result=29, 30, 31, 32
Example parameters (p1)=2; Result=L0
Example parameters (p1)=1, 2, 3; Result=27, 28, 29, 30, 31, 32

SList: before item p1

The result of this is the part of the SList that comes before the "sublist" at position p1 (and not including it).
Example parameters (p1)=3; Result=2, 27, 28, 0
Example parameters (p1)=2; Result=2, 27, 28
Example parameters (p1)=1; Result=L0

SList: after item p1

The result of this is the part of the SList that comes after the "sublist" at position p1 (and not including it).
Example parameters (p1)=3; Result=L0
Example parameters (p1)=2; Result=4, 29, 30, 31, 32
Example parameters (p1)=1; Result=0, 4, 29, 30, 31, 32

List & List Operation - Row K

These operations take two lists as inputs, and produce a list as a result.

Positions: of lb on la

This returns a list containing, for each element of lb, the position at which this value is found on la. At first sight this looks the same as the First position of p1 operation from the List Operation numipulation box. However, it differs from this in one important aspect: once a particular position has been identified, it is no longer available for further selection. This means that if there are duplicates on la and the same duplicates on lb, both positions will be returned - in contrast to the First position of p1 operation, which always returns the first position of any number, since the operations on the items in the parameter list are independent of each other. If the number being considered on lb does not exist on la, or the positions at which it occurs have already been returned, the position is given as zero.

Example: la=2, 1, 3, 4, 3, 5; lb=3, 2, 7, 3, 3, 4: Result=3, 1, 0, 5, 0, 4 (the 3 and 5 correspond to the two positions of 3 in la. The two zeros are returned because 7 does not exist on la and a third 3 is not available.

This operation allows you to put an unsorted list in la, put a sorted version in lb, and generate the positions at which the items on lb occurred at on the unsorted list.

Example: la=10, -10, 30, 40, 30, 50; lb=-10, 10, 30, 30, 40, 50: Result=2, 1, 3, 5, 4, 6.

Common: on la and lb

Returns a list of all those items that exist on both la and lb. Each value occurs only once in the result. The order is based on the first occurrence of the number on la.
Example: la=1, 2, 3, 4, 5, 3; lb=3, 2, 7, 8, 3, 6, 9: Result=2, 3

Union: on la or lb

Returns a list of all those items that exist on either la or lb. Each value occurs only once in the result. Essentially, the two lists are joined together (la followed by lb) and duplicates are removed.
Example: la=1, 2, 3, 4, 5, 3; lb=3, 2, 7, 8, 3, 6, 9: Result=1, 2, 3, 4, 5, 7, 8, 6, 9

Diff: on la but not lb

Returns a list of all those items that exist on la but not on lb. Each value occurs only once in the result. The order is based on the first occurrence of the number on la.
Example: la=1, 2, 3, 4, 5, 3; lb=3, 2, 7, 8, 3, 6, 9: Result=1, 4, 5

SDiff: on one not both

Symmetrical Diff: returns a list of all those items that exist on la but not lb, followed by those that exist on lb but not la. Each value occurs only once in the result.
Example: la=1, 2, 3, 4, 5, 3; lb=3, 2, 7, 8, 3, 6, 9: Result=1, 4, 5, 7, 8, 6, 9

Remove 1 lb from la

For each item on lb, remove one occurrence of it from la and return the resulting list. Duplicates will be removed from la only if there are corresponding duplicates on lb.
Example: la=1, 6, 2, 3, 4, 5, 3, 6; lb=6, 1, 3, 4, 3: Result=2, 5, 6 (Note: both 3s removed, but only one 6)

Remove all lb from la

For each item on lb, remove all occurrences of it from la and return the resulting list.
Example: la=1, 6, 2, 3, 4, 5, 3, 6; lb=6, 1, 3, 4, 3: Result=2, 5 (Note: both 3s and both 6s removed)

Join la and lb

Simple joining together of la followed by lb.
Example: la=1, 6, 2, 3, 4, 5, 3, 6; lb=6, 1, 3, 4, 3:
Result=1, 6, 2, 3, 4, 5, 3, 6, 6, 1, 3, 4, 3

Sort la by lb (asc)

Takes two lists of equal length as inputs. Returns the items of la re-ordered in such a way as to match the order of corresponding items on lb if this were sorted in ascending numerical order.
Example: la=70, 50, 30, 20, 40, 10; lb=6, 4, 2, 6, 10, 8:
Result=30, 50, 70, 20, 10, 40 (the smallest number of lb is 2, which is in position 3, and 30 is the 3rd item on la; and so on.)

Sort la by lb (desc)

As above, but as if lb were sorted in descending numerical order.
Example: la=70, 50, 30, 20, 40, 10; lb=6, 4, 2, 6, 10, 8:
Result=40, 10, 20, 70, 50, 30

Cross Add: la+lb

To understand this operation, consider la to be the row labels of a table, and lb to be the column labels. The value of a cell at a particular row and column in the table is the row label + column label.

So, if la=10, 20, 30 and lb=1, 2, 3, 4, then the resulting table would look as follows:

      1   2   3   4
10 11 12 13 14
20 21 22 23 24
30 31 32 33 34

The list resulting from this operation is the values in the cell tables (extracted row by row, starting at the top), namely: 11, 12, 13, 14, 21, 22, 23, 24, 31, 32, 33, 34.

Cross Subtract: la-lb

This is similar to Cross Add, but in this case the resulting cell values are the row label - column label. So, given the same example as for Cross Add, the resulting table is:

      1   2   3   4
10   9  8   7   6
20 19 18 17 16
30 29 28 27 26

so the resulting list is: 9, 8, 7, 6, 19, 18, 17, 16, 29, 28, 27, 26

Cross Multiply: laXlb

This is similar to Cross Add, but in this case the resulting cell values are the row label X column label. So, given the same example as for Cross Add, the resulting table is:

      1   2   3   4
10 10 20 30 40
20 20 40 60 80
30 30 60 90 120

so the resulting list is: 10, 20, 30, 40, 20, 40, 60, 80, 30, 60 90, 120

Cross Divide: la/lb

This is similar to Cross Add, but in this case the resulting cell values are the row label/column label.

XP1:len(lb) of la items and XP2:len(la) of lb

The above Cross... operations allow you directly to undertake some of the basic arithmetic operations on the row labels and column labels of a table. Sometimes, you may wish to carry out more complex operations.  The two XP... operations (standing for Cross-pairs), which should be considered together, each generate a list, and these two lists can then be used as inputs to an Items Operation numipulation box, where you can apply any operation.

Given the same example as for the Cross Add operation, i.e. la=10, 20, 30 and lb=1, 2, 3, 4, then XP1... is the list derived from the table where the row labels are placed in every cell of the row:

      1   2   3   4
10 10 10 10 10
20 20 20 20 20
30 30 30 30 30

so that the result, as a list, is 10, 10, 10, 10, 20, 20, 20, 20, 30, 30, 30, 30.

XP2... is the list derived from the table where the column labels are placed in every cell of the column:

      1   2   3   4
10  1   2   3   4
20  1   2   3   4
30  1   2   3   4

so that the result, as a list, is 1, 2, 3, 4, 1, 2, 3, 4, 1, 2, 3, 4.

These two lists could now be taken as input an Items Operations numipulation box with any operation selected. For example, selecting the Power operation would yield the list:
10, 100, 1000, 10000, 20, 400, 8000, 160000, 30, 900, 27000, 810000.

Pair up

For this function, lists la and lb must have the same length. The result is the list of pairs of corresponding items taken from la and lb, e.g. the 1st item of la followed by the 1st item of lb, and then the 2nd item of la followed by the 2nd item of lb, for lists with 2 items on each.

So, if la=1, 2, 3, 4 and lb=5, 6, 7, 8, then the result is 1, 5, 2, 6, 3, 7, 4, 8.

If la=L0 and lb=L0, the result is L0.

Note: This is useful for taking a list of row numbers and a list of column numbers and yielding a list of row/column pairs.

Note: Pair up is identical to Merge at end below, as long as la and lb have the same lengths, as the result is equivalent to a table with la as the first column and lb as the second column:

1 5
2 6
3 7
4 8

for the first example given above.

Merge: (various types)

To understand merging, you must take the list lb to be the values of a single new column to be added to a table formed by the values of la. Clearly, this table must have the same number of rows as there are values in lb.

So, if la=1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 and lb=30, 40, 50, then imagine la laid out in 3 rows (row-by-row, left-to-right and top-to-bottom:

1 2   3   4
5 6   7   8
9 10 11 12

Merging involves inserting the values of lb to become a new column in the table, either at the start or at the end. The result is the elements of the new table extracted row-by-row (top-to-bottom, left-to-right).

Special cases: if la is an empty list, then the result is lb, while if lb is an empty list, then the result is la.

Merge at start means insert the items of lb to be the first column in the new table. So, given the above example, the new table is:

30 1 2   3   4
40 5 6   7   8
50 9 10 11 12

so the result is

30, 1, 2, 3, 4, 40, 5, 6, 7, 8, 50, 9, 10, 11, 12

Merge at end means insert the items of lb to be the last column in the new table. So, given the above example, the new table is:

1 2   3   4  30
5 6   7   8  40
9 10 11 12 50

so the result is

1, 2, 3, 4, 30, 5, 6, 7, 8, 40, 9, 10, 11, 12, 50

Note: More general merging can be undertaken using the Insert lc @ col d or Merge table lc @ col d operations of Table Construction numipulation boxes.

Simple map values

This treats the elements of the first list (la) separately, and maps each of them to another (or the same) number. The resulting list should have the same number of items as la. The mapping is defined by the values of the second list (lb). The values of lb should be considered as a series of pairs:
Num Value Num Value ......(Default).

The result list has the same values as the first list (la) except that wherever the first number of one of the pairs on lb is found, it is replaced by the second number of the pair. If there is a surplus number after the pairs (Default), this replaces any input value for which no mapping is explicitly defined. If there is no surplus number and no explicit mapping pair is found, the value in the result list is the same as on la. Note: once an explicit mapping is found for a value, working left to right on lb, no further mapping is carried out for that value. Note: it can be helpful to use colons and semicolons to make the pairs and mappings clearer.

Example: la=1 2 3 4 5 6 and lb=3: -127799; 4: -127773; 5: -127796, the result is:
1 2 -127799 -127773 -127796 6, where the values 2, 3 and 4 have been replaced (mapped), but the others are left unchanged.
Example: la=1 2 3 4 5 6 and lb=3: -127799; 4: -127773; 5: -127796; 0, the result is:
0 0 -127799 -127773 -127796 0, where the default value, 0, is used for any number not specifically mapped. Example: la=1 2 3 4 5 6 and lb=3: -127799; 4: -127773; 5: -127796; 3: -127776, the result is:
1 2 -127799 -127773 -127796 6; the second mapping for 3 in lb is ignored.

This operation can be very useful for letting you work with simple numbers, but then map them to longer format codes for a graphical interface output.

Change values

This is concerned with changing the values of la; the positions and values are specified in lb.

List lb contains pairs of numbers: the first of each pair must specify a valid index (position) of la, while the second of the pair specifies the value that should replace the existing value. If the position specified is invalid, an error is thrown. If there is an odd number of items in lb, the last item is ignored. Note: the numbers are changed sequentially, left to right, so a value that has already been changed may be changed again.
Example: la=5, -6, 3, 0, 4, -8 and lb=2, 7, 5, 9, the result is 5, 7, 3, 0, 9, 8
Example: la=5, -6, 3, 0, 4, -8 and lb=2, 7, 5, 9, 2, 10, the result is 5, 10, 3, 0, 9, 8, where the value at position 2 has been changed twice: first to 7 and then to 10.

SList functions

The following functions are all concerned with SLists only. They all take an SList as an input. The example SList for each function is la=2 27 28 0 4 29 30 31 32. Note: this has 3 "sublist" items.

SList: add content head

This adds a new "sublist", content lb, at the beginning of the SList defined in la.
Example: lb=41, 42; Result=2, 41, 42, 2, 27, 28, 0, 4, 29, 30, 31, 32
Example: lb=L0; Result=0, 2, 27, 28, 0, 4, 29, 30, 31, 32

SList: add content end

This adds a new "sublist", content lb, at the end of the SList defined in la.
Example: lb=41, 42; Result=2, 27, 28, 0, 4, 29, 30, 31, 32, 2, 41, 42
Example: lb=L0; Result=2, 27, 28, 0, 4, 29, 30, 31, 32, 0

Meta List to Number

List lb should contain only positive integer codes that specify functions that can be found in the List Function to Number numipulation boxes, as defined under List Function to Numbers when the Codes button is pressed, e.g. 1 for Sum of list values, or 4 for Maximum value. The result is a list of the results of applying the specified functions to la.
Example: la=1, 2, 3, 4, 5, 6, 1 and lb=1 {Sum}, 2 {Product}, 7 {Length}, 4 {Max}, where the comments indicate the functions specified by the integers.
The result= 22, 720, 7, 6
If lb=L0, the result is L0.

Meta List to List

List lb should contain only positive integer codes that specify functions that can be found in the List Function to List numipulation boxes, as defined under List Function to Lists when the Codes button is pressed, e.g. 1 for Sort (ascending), 3 for Reverse, or 4 for Remove duplicates. Unlike the function above, the output is the result of applying each function in turn, from left to right, starting with the input list la. To explain, see the following example:
Example: la=1, 2, 3, 5, 4, 6, 1 and lb=1 {Sort asc}, 3 {Reverse}, 9 {All but first}, 9 {All but first}
The result is 4, 3, 2, 1, 1 because the sort of la is 1, 1, 2, 3, 4, 5, 6; the reverse of this is 6, 5, 4, 3, 2, 1, 1, and then applying All but first twice removes the first two items of this.

This is a useful function for applying several List to List functions in a single numipulation box.
If lb = L0, so no functions are applied, the result is simply la.

Find All - Row L

Find All operations are concerned with identifying which items on input list [a] satisfy some relationship with the corresponding items on the second list, [b], and creating a list either of the items that satisfy this relationship or of the positions of those items in [a].

Val of a: a < b

This generates a list of all the items on [a] that are less than the corresponding item on [b].
Example: [a]=4, 3, 5, 4, 6, 7; [b]=5, 1, 5, 2, 8, 10: Result=4, 6, 7
Example: [a]=4, 3, 5, 4, 6, 7; [b]=5: Result=4, 3, 4 (with the usual item cycling, so that [b] is treated as = 5, 5, 5, 5, 5, 5)

Pos of a: a < b

This generates a list of all the positions on [a] whose items are less than the corresponding item on [b].
Example: [a]=4, 3, 5, 4, 6, 7;  [b]=5, 1, 5, 2, 8, 10: Result=1, 5, 6
Example: [a]=4, 3, 5, 4, 6, 7;  [b]=5: Result=1, 2, 4   (with the usual item cycling, so that [b] is treated as = 5, 5, 5, 5, 5, 5)

The other comparison relationships work in the same way.

Count - Row M

For each item, b, on the second input list, [b], count the number of occurrences of items in the first input list, la, that satisfy a given relationship with b. Return a list with these counts as the items.

Items on la < b

p> Example: la=4, 3, 5, 4, 6, 7, 3, 3 ; [b]=3, 4, 5, 9: Result=0, 3, 5, 8 (there are 0 items < 3; 3 items < 4; 5 items < 5; 8 items < 9)

The other comparison relationships work in the same way.

Range Selection - Row N

Range selection is concerned with finding items on the first input list, la, whose values or positions are in one or more ranges (as defined by pairs of parameters, p1 and p2, on the second input list), and returning either the values or positions that are inside one or more of the ranges, or the ones that lie outside all of the ranges.

Important: Unlike other functions with a number of sets of parameters, these parameters are treated as a whole. The | shown on the label should be read as OR. The order of the items in the result is strictly dependent on the order in the input list, la, not on the order of the pairs of parameters.

p1>=Pos<=p2: Val in

This says: find all the positions that lie in the ranges defined by pairs of parameters p1 and p2, and return the values of the items at these positions.
Example: la=10, 20, 30, 40, 50, 60, 70, 80, 90; p1,p2 | p1,p2 | ...=2, 4, 6, 8: Result: 20, 30, 40, 60, 70, 80
That is, all the values found either in positions 2->4 inclusive OR in 6->8 inclusive.
Example: la=10, 20, 30, 40, 50, 60, 70, 80, 90; p1,p2 | p1,p2 | ...=6, 8, 2, 4: Result: 20, 30, 40, 60, 70, 80
That is, all the values found either in positions 6->8 inclusive OR in 2->4 inclusive.  Note: the result is independent of the order of the sets of parameters, being the same as for parameters 2, 4, 6, 8 above.
Example: la=10, 20, 30, 40, 50, 60, 70, 80, 90; p1,p2 | p1,p2 | ...=5, 8, 2, 7: Result: 20, 30, 40, 50, 60, 70, 80 (Note: the ranges overlap, so effectively these sets of parameters (5->8 and 2->7) define the positions 2->8 inclusive.

p1>=Pos<=p2: Val out

This says: find all the positions that lie in the ranges defined by pairs of parameters p1 and p2, and return the values of the items at all positions except those that lie within these ranges.
Example: la=10, 20, 30, 40, 50, 60, 70, 80, 90; p1,p2 | p1,p2 | ...=2, 4, 6, 8: Result: 10, 50, 90
That is, all the values except those found at positions 2->4 inclusive OR 6->8 inclusive.

p1>=Val<=p2: Val in

This says: find all the items whose values lie in the ranges defined by pairs of parameters p1 and p2, and return these values.
Example: la=10, 20, 30, 40, 50, 60, 70, 80, 90; p1,p2 | p1,p2 | ...=15, 35, 50, 70: Result: 20, 30, 50, 60, 70
That is, all the values that are in the ranges 15->35 OR the range 50->70, inclusive.

p1>=Val<=p2: Val out

This says: find all the items whose values lie in the ranges defined by pairs of parameters p1 and p2, and return all items on la except these.
Example: la=10, 20, 30, 40, 50, 60, 70, 80, 90; p1,p2 | p1,p2 | ...=15, 35, 50, 70: Result: 10, 40, 80, 90
That is, all the values that are not in one of the ranges 15->35 OR 50->70, inclusive.

p1>=Val<=p2: Pos in

This says: find all the items whose values lie in the ranges defined by pairs of parameters p1 and p2, and return the positions of these items.
Example: la=10, 20, 30, 40, 50, 60, 70, 80, 90; p1,p2 | p1,p2 | ...=15, 35, 50, 70: Result: 2, 3, 5, 6, 7
That is, the positions of all the values that are in the range 15->35 OR 50->70, inclusive.

p1>=Val<=p2: Pos out

This says: find all the items whose values lie in the ranges defined by pairs of parameters p1 and p2, and return the positions of all items on la except these items.
Example: la=10, 20, 30, 40, 50, 60, 70, 80, 90; p1,p2 | p1,p2 | ...=15, 35, 50, 70: Result: 1, 4, 8, 9
That is, the positions of all the values that are not in the range 15->35 OR the range 50->70, inclusive.

Other definitions of range (> and <, for example) work in a similar way.

If-Then-Else Boxes

Please note that there are four types of If-Then-Else box: Simple (Row O), Items (Row P), All (Row Q) and List (Row R). If you're looking for one that provides a fairly flexible/complex condition, try if exp(la)=lb: lc, else ld within the If-Then-Else (List) set of functions.

If-Then-Else (Simple) - Row O

Despite looking complicated, this is a simple If-Then-Else for two numbers being compared, a and b, with two possible resulting lists, lc and ld. This says: if a satisfies some relationship with b then the resulting list will be lc, otherwise it will be ld.

if a < b: lc, else ld

Example: a=3; b=4; lc=25; ld=50: Result=25 (as 3<4 the result is lc)

Example: a=3; b=4; lc=25, 70; ld=L0: Result=25, 70  (as 3<4 the result is lc)

Example: a=4; b=3; lc=101; ld=L0: Result=L0  (as the check for 4<3 fails the result is ld)

Other comparisons work in a similar way. 

Note: You can sometimes avoid using several of these linked together by using a single Case (Map Values) operation (List & List Operation), as long as all your possible outputs are single numbers.

If-Then-Else (Items) - Row P

This is an If-Then-Else for corresponding items on 4 input lists: [a], [b], [c], [d]. The length of [a] determines the length of the output, with other lists of items cycling in the usual way.

This says: if a satisfies some relationship with b then the resulting value will be c, otherwise it will be d.

if a < b: c, else d

Example: [a]=3; [b]=4; [c]=25; [d]=50: Result=25  (as 3<4 the result is c)
Example: [a]=2, 5, 4, 3; [b]=4; [c]=25, 26, 27, 28; [d]=50: Result=25, 50, 50, 28 (the 1st and 4th items on la are < 4, so the items at these positions on the result list are those from list [c], while the others are from list [d].
Example: [a]=2, 5, 4, 3; [b]=4, 2, 6, 6; [c]=25, 26, 27, 28; [d]=50:  Result=25, 50, 27, 28 

If [a]=L0, the output will be L0.

Other comparisons work in a similar way. 

If-Then-Else (All) - Row Q

This says: if all the items on [a] satisfy some relationship with the corresponding items on [b], then the resulting list will be lc, otherwise the resulting list will be ld. Note: lc and ld are treated as whole lists, not lists of items from which the result will be constructed.

if all a < b: lc, else ld

Example: [a]=3; [b]=4; lc=25; ld=50: Result=25  (as 3<4 the result is lc)
Example: [a]=2, 5, 4, 3; [b]=4; lc=25, 26, 27, 28; ld=50: Result=50  (Two of the items failed the test, so the result is the single-item list, ld, which is 50)
Example: [a]=2, 5, 4, 3; [b]=10; lc=25, 26, 27; ld=50: Result=25, 26, 27 (All the items passed the test, so the result is the 3-item list, lc)

N.B. More strictly, the meaning is: if none of the items on [a] fail to satisfy some relationship with the corresponding items on [b], then the resulting list will be lc, otherwise the resulting list will be ld. This means that if [a]=L0, the result will always be lc, as there are no items that can fail the specified relationship.

Other comparisons work in a similar way. 

N.B. As shown by the first example for each of these first three If-Then-Else numipulation boxes, if the four inputs contain only one number each, then their behaviours are identical, so any of them may be used for a simple number If-Then-Else. You can avoid having several linked together by using the various Case:... functions within List Function to Number or the Case list function within List Function to List.

If-Then-Else (List) - Row R

This says: if lists la and lb satisfy some relationship, then the resulting list will be lc, otherwise the resulting list will be ld. The descriptions below just mention and describe the relationship within the function name.

exp(la)=lb: lc, else ld

This is true if the evaluation of the list la as an Expression list (see under List Function to List functions) is exactly the same as list lb.

This provides a very flexible way of specifying the condition of the If-Then-Else. The expectation is that the results of the Expression list would come from Check (1/0):... or Logic (1/0):.. operations and functions, so that lb would normally consist only of 1s and 0s, but this is not essential.

In the following examples, the assumption is made that input Mappings have been specified using the +-x/ button under Mappings to allow more readable input lists.

Example: la=4 < 5 AND 9 > 3; lb=1 is true, as la evaluates to 1.
When lb=1, the full condition can just be thought of as la, i.e. 4 < 5 AND 9 > 3.
Example: la=4 < 5 AND 9 > 11; lb=1 is false, as la evaluates to 0.

This function provides a handy way of specifying some negative conditions.
Example: la=4 < 5 AND 9 > 3 Next 2 < 4 AND 5 < 4; lb=1 0 is true, as 4 < 5 AND 9 > 3 evaluates to 1, but 2 < 4 AND 5 < 4 evaluates to 0.
When used in this way, with lb=1 0, read the Next as BUT NOT(2nd expression). So, in the last example, the full condition can be read as:

4 < 5 AND 9 > 3 BUT NOT (2 < 4 AND 5 < 4), which is true.

Note: this function is so useful, that it is the default for every If-Then-Else (List) box.

all la on lb

This is true if every item on the list la is also found on list lb, i.e. la is a subset of lb. More strictly, this is true if there is no item on la that is not found on lb.
Example: la=2,3; lb=1,2,3,4 is true.
Example: la=1,2,3; lb=2,3,4 is false, as 1 is not found on lb.
Example: la=L0; lb=1,2,3,4 is true, as there is no item on L0 that is not on lb.

>=1 la on lb

This is true if at least one item on la is also found on list lb, i.e. la and lb intersect.
Example: la=2,3,5; lb=1,2,4 is true, as 2 is found on both lists.
Example: la=1,2,3; lb=4,5,6 is false, as no number exists on both lists.
Example: la=L0; lb=1,2,3,4 is false, as L0 is empty, so there cannot be at least one item on it that is also found on lb.

1st of la on lb

This is true if the first item of la is also found on list lb.
Example: la=2,3,5; lb=1,2,4 is true, as the first item, 2, of la is found on lb.
Example: la=1,2,3; lb=4,5,6 is false, as the first number, 1, of la is not found on lb.
Example: la=L0; lb=1,2,3,4 is undefined, as it has no first item

len(la) on lb

This is true if the length of list la found on list lb.
Example: la=2,3,5; lb=1,2,3,4 is true, as the number of items on la, 3, is found on lb.
Example: la=2,3,5; lb=3 is true, as the number of items on la, 3, is found on lb.
Example: la=2,3,5,4,5,6; lb=3 is false, as the number of items on la, 6, is not found on lb.
Example: la=L0; lb=0 is true, as the length of la, 0, is found on lb.

lengths =

This is true if the lengths of lists la and lb are the same.
Example: la=2,3,5; lb=1,2,3 is true, as both have 3 items.
Example: la=2,3,5; lb=3 is false, as la has 3 items but lb has 1 item.

la = lb

This is true if la and lb are equal.
Example: la=2,3,5; lb=2,3,5 is true.
Example: la=2,3,5; lb=2,5,3 is false.
Example: la=L0; lb=L0 is true.

sorts =

This is true if la and lb are both sorted and found to be the same.
Example: la=2,5,3; lb=3,5,2 is true, as both sort to 2,3,5.
Example: la=2,5,3; lb=3,5,4 is false, as the two sorted versions (2,3,5 and 3,4,5) are different.

uniques =

This is true if la and lb are both contain exactly the same values, ignoring duplicates.
Example: la=2,3,3,5; lb=3,5,5,2,2 is true, as both have the unique values 2,3,5.
Example: la=2,3,5; lb=3,5,4 is false.

la in lb range

This is true if every value on la is >= the minimum value on lb and <= the maximum value on lb.
Example: la=4,3,5; lb=3,5,5,2,2 is true, as the minimum value of lb is 2, the maximum value is 5, and every value on la is >=2 and <=5.
Example: la=2,3,7; lb=3,5,4 is false, as 7 is outside the range 3-5.

Table Operation - Row S

The first two inputs for Table Operation are a list, la, and a number, ncols. Together these represent an input table (see Tables), where la represents the cell values and ncols represents the number of columns in the input table.

The operations defined take this input table, and produce a list of numbers, based on parameters defined in the last input list, p1,p2... p1,p2... ... . Some of the operations produce a row, column, block or cell as the result, while others produce some function of the values. 

Some of these operations require one parameter, some two, some more (the name of the operation makes this clear, as it always refers to the parameters). In all cases, more than one set of parameters may be entered; the final result list consists of the results for the first set of parameters, followed by those for the second set, and so on. However, some are intended for multiple sets of parameters, e.g. Row and Column, while others, e.g. Swap rows or Clusters, are intended for a single set of parameters only.

Note: The results for an empty input list, la, are described individually.

All the operations described below, except those within the Searching and Graph Plotting groups, assume that la=1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 and ncols =4, so that the input table is

1 2   3   4
5 6   7   8
9 10 11 12

Some operations also give some additional examples for la.

Row p1

This takes a single parameter, p1. The p1th row of the input table is returned as a result.

Example: p1=2: Result=5, 6, 7, 8
Example: p1=2, 1, 2: Result=5, 6, 7, 8, 1, 2, 3, 4, 5, 6, 7, 8
Example: p1=2, 4: Result=5, 6, 7, 8, undefined  (since, although the second row exists, there is no 4th row, so the result for this parameter is returned as undefined ).

If la is an empty list, there are 0 rows, so the result is undefined .

Column p1

This takes a single parameter, p1. The p1th column of the input table is returned as a result.

Example: p1=2: Result=2, 6, 10
Example: p1=2, 1: Result=2, 6, 10, 1, 5, 9

If la is an empty list, the result is an empty list if p1 is valid, otherwise it is undefined .

Cell [row,col]=[p1,p2]

This takes two parameters, p1 and p2. The value in the cell found at the intersection of row p1 and column p2 is returned (in a list) as a result.

Example: p1,p2=2, 3: Result=7
Example: p1,p2=2, 3, 2, 1, 1, 2: Result=7, 5, 2
Example: p1,p2=2, 3, 2, 1, 1, 2, 3: Result=7, 5, 2 (the last parameter is ignored as it is surplus).
Example: p1,p2=2, 3, 1.5 , 2, 1, 2: Result=7, undefined, 2 (the second pair of parameters, 1.5, 2, are not valid row/column indices for the input table, so undefined is returned as the result for these).

If la is an empty list, the result for any pair of parameters p1 and p2 is undefined .

Block [p1,p2]->[p3,p4]

This takes four parameters, p1, p2, p3, p4. 

p1 and p2 represent the row number and column number of one cell in the table, and p3 and p4 represent the row number and column number of a second cell. Conceptually, a rectangular block is drawn around these cells, and the result is a list of the values in all the cells contained within this block (extracted row-by-row starting at the top).

Example: p1,p2,p3,p4=1, 2, 3, 4

1 2   3   4
5 6   7   8
9 10 11 12

The first cell is row 1, column 2 = the cell with 2 in it.
The second cell is row 3, column 4 = the cell with 12 in it.
The bold cells show those cells within the rectangle that surrounds these two cells, so the result is:
2, 3, 4, 6, 7, 8, 10, 11, 12

Example: p1,p2,p3,p4=3, 4, 1, 2

The same two cells are specified as in the first example, albeit in a different order, so the result is the same: 2, 3, 4, 6, 7, 8, 10, 11, 12

Example: p1,p2,p3,p4=2, 1, 2, 3

1 2   3   4
5 6   7   8
9 10 11 12

The result is 5, 6, 7

Example: p1,p2,p3,p4=2, 3, 2, 3

1 2   3   4
5 6   7   8
9 10 11 12

Block hXw [p1,p2]:p3Xp4

This takes four parameters, p1, p2, p3, p4. 

p1 and p2 represent the row number and column number of the top-left cell in a block of the table, while p3 and p4 represent the height and width (in cells) of the block. The result is a list of the values in all the cells contained within this block (extracted row-by-row starting at the top).

Example: p1,p2,p3,p4=1, 2, 3, 3

1 2   3   4
5 6   7   8
9 10 11 12

The top-left cell of the block is row 1, column 2 = the cell with 2 in it.
The bold cells show the block with this cell at its top-left corner, with depth 3 cells and width 3 cells, so the result is:
2, 3, 4, 6, 7, 8, 10, 11, 12

Example: p1,p2,p3,p4=2, 3, 1, 1

1 2   3   4
5 6   7   8
9 10 11 12

The result is the value in the single cell at row 2, column 3 = 7

If la is an empty list, the result for any set of parameters p1, p2, p3 and p4 (except L0) is undefined .

First p1 rows

The result is the first p1 rows of la.

Example: p1=2. Result = 1, 2, 3, 4, 5, 6, 7, 8, i.e. the table:

1 2 3 4
5 6 7 8

Note: p1 may be 0, in which case the output list is an empty list. Note: an empty list for la is valid, as long as p1=0, when the result is also an empty list.

All but first p1 rows

The result is all rows of la except for the first p1 rows.

Example: p1=2. Result = 9, 10, 11, 12, i.e. just the last row, as the first two are excluded

Note: p1 may be 0, in which case the output list = la. If p1 is equal to the number of rows, the result is an empty list. Note: an empty list for la is valid, as long as p1=0, when the result is also an empty list.

Final p1 rows

The result is the last p1 rows of la.

Example: p1=2. Result = 5, 6, 7, 8, 9, 10, 11, 12, i.e. the table:

5 6 7 8
9 10 11 12

Note: p1 may be 0, in which case the output list is an empty list. Note: an empty list for la is valid, as long as p1=0, when the result is also an empty list.

All but final p1 rows

The result is all rows of la except for the last p1 rows.

Example: p1=2. Result = 1, 2, 3, 4, i.e. just the first row, as the last two are excluded

Note: p1 may be 0, in which case the output list = la. If p1 is equal to the number of rows, the result is an empty list. Note: an empty list for la is valid, as long as p1=0, when the result is also an empty list.

First p1 cols

The result is the first p1 columns of la, extracted as a block.

Example: p1=2. Result = 1, 2, 5, 6, 9, 10, i.e. the table:

1 2
5 6
9 10

Note: p1 may be 0, in which case the output list is an empty list.

All but first p1 cols

The result is all columns of la except for the first p1 columns, extracted as a block.

Example: p1=2. Result = 3, 4, 7, 8, 11, 12, i.e. just the last two columns of la, as the first two are excluded.

Note: p1 may be 0, in which case the output list = la.

Final p1 cols

The result is the last p1 columns of la, extracted as a block.

Example: p1=2. Result = 3, 4, 7, 8, 11, 12, i.e. the table:

3 4
7 8
11 12

Note: p1 may be 0, in which case the output list is an empty list. If p1 is equal to the number of columns, the result is la.

All but final p1 cols

The result is all columns of la except for the last p1 columns, extracted as a block.

Example: p1=2. Result = 1, 2, 5, 6, 9, 10, i.e. just the first two columns of la, as the last two are excluded.

Note: p1 may be 0, in which case the output list = la. If p1 is equal to the number of columns, the result is an empty list.

Rows p1 to p2

The result is the rows of la from p1 through to p2.

Example: p1=2, 3. Result = 5, 6, 7, 8, 9, 10, 11, 12.

Example: p1=1, 3. Result = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12.

Example: p1=3, 2. Result = 5, 6, 7, 8, 9, 10, 11, 12 - the same result as for p1=2, 3, as 3, 2 specifies the same block.

Cols p1 to p2

The result is the columns of la from p1 through to p2, extracted as a block.

Example: p1=2, 4. Result = 2, 3, 4, 6, 7, 8, 10, 11, 12.

Example: p1=4, 2. Result = 2, 3, 4, 6, 7, 8, 10, 11, 12, the same result as for p1=2, 4, as 4, 2 specifies the same block.

Important: the result for p1=2, 4 is NOT the same as for the function Col p1 above with p1=2, 3, 4. With Cols p1 to p2, the columns are extracted as a complete block, while with Col p1, each column specified by p1 is extracted individually, so that the result for p1=2, 3, 4 would be 2, 6, 10, 3, 7, 11, 4, 8, 12 {Col 2 followed by Col 3 followed by Col 4}.

Swap rows p1 & p2

The result has rows p1 and p2 of la swapped in position.

Example: p1,p2=2,3. Result = 1, 2, 3, 4, 9, 10, 11, 12, 5, 6, 7, 8, i.e. the table:

1 2   3   4
9 10 11 12
5 6   7   8

Remember: For this and others below in this section, if you have two pairs of parameters, the result will not be the outcome of applying both swaps to the input list in one go, with the result length the same length as la; it will be the result for the first pair, followed by the result for the second pair (i.e. the result will be twice the length of la).

Swap cols p1 & p2

Similar to Swap rows.. but with the swapping of columns.

Example: p1,p2=2,3. Result = 1, 3, 2, 4, 5, 7, 6, 8, 9, 11, 10, 12, i.e. the table

1 3   2   4
5 7   6   8
9 11 10 12

Move row p1 to p2

The result has row p1 of la moved to become row p2 of the result. The relative ordering of the other rows remains unchanged.

Example: p1,p2=1,3. Result = 5, 7, 6, 8, 9, 11, 10, 12, 1, 3, 2, 4, i.e. the table

5 6   7   8
9 10 11 12
1 2   3   4

Move col p1 to p2

The result has column p1 of la moved to become column p2 of the result. The relative ordering of the other columns remains unchanged.

Example: p1,p2=1,3. Result = 2, 3, 1, 4, 6, 7, 5, 8, 10, 11, 9, 12, i.e. the table

2   3   1   4
6   7   5   8
10 11 9   12

Delete rows p1->p2

The result has rows p1 through to p2 of la removed. The relative ordering of the other rows remains unchanged.

Example: p1,p2=2,2. Result = 1, 2, 3, 4, 9, 10, 11, 12, i.e. the table:

1 2   3   4
9 10 11 12

Example: p1,p2=2,3. Result = 1, 2, 3, 4

Example: p1,p2=1,3. Result = L0

Delete cols p1->p2

Similar to Delete rows... The result has columns p1 through to p2 of la removed. The relative ordering of the other columns remains unchanged.

Example: p1,p2=1,2. Result = 3, 4, 7, 8, 11, 12, i.e. the table:

3   4
7   8
11 12

Look-up rows: p1

This finds the first row, moving from top to bottom, that has the value p1 as its first item (i.e. in column 1). The result is the list of all the elements in the row except for the first one.

If no row is found with the value p1 as its first item, the result is undefined.

Example: p1=5: Result=6, 7, 8
Example: p1=6, 9: Result=undefined, 10, 11, 12

If la is an empty list, the result for any value of p1 is undefined .

Look-up cols: p1

This finds the first column, moving from left to right, that has the value p1 as its first item (i.e. in row 1). The result is the list of all the elements in the column except for the first one.

If no column is found with the value p1 as its first item, the result is undefined.

Example: p1=2: Result=6, 10
Example: p1=3, 1: Result=7, 11, 5, 9

If la is an empty list, the result for any value of p1 is undefined .

Rows: @p1 < p2

This selects and returns as lists all the rows that satisfy the condition: the item in column p1 is less than the value p2. The order of the row lists in the result is determined by the input table (rows nearer to the top appear first). Note: @p1 is shorthand for 'the item at position p1'.

If no such rows are found for p1 and p2, an empty list results.
If p1 is not a valid column number, the result is undefined.

Example: p1, p2=2, 7: Result=1, 2, 3, 4, 5, 6, 7, 8 (since only in the first two rows is the second item less than 7).
Example: p1=1, 0: Result=L0 (since no rows have the first item less than 0).

If la is an empty list, the result is an empty list.

Rows: @p1 <= p2, Rows: @p1 = p2, Rows: @p1 <> p2, Rows: @p1 >= p2, Rows: @p1 > p2

These operate in a similar manner to Rows: @p1 < p2, but the comparison test is, of course, different.

Cols: @p1 < p2

This selects and returns as lists all the columns that satisfy the condition: the item in row p1 is less than the value p2.  The order of the column lists in the result is determined by the input table (columns nearer to the left appear first).

If no such columns are found for p1 and p2, an empty list results.
If p1 is not a valid row number, the result is undefined.

Example: p1, p2=2, 7: Result=1, 5, 9, 2, 6, 10 (since only in the first two columns is the second item less than 7).
Example: p1=1, 0: Result=L0 (since no columns have the first item less than 0).

If la is an empty list, the result is undefined .

Cols:@p1 <= p2, Cols: @p1 = p2, Cols: @p1 <> p2, Cols: @p1 >= p2, Cols: @p1 > p2

These operate in a similar manner to Cols: @p1 < p2, but the comparison test is, of course, different.

Rows: @p1 < @p2

This selects and returns as lists all the rows that satisfy the condition: the item in column p1 is less than the item in column p2. The order of the row lists in the result is determined by the input table (rows nearer to the top appear first).

If no such rows are found for p1 and p2, an empty list results.
If p1 or p2 is not a valid column number, the result is undefined.

Example: p1, p2=2, 3: Result=1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12 (since in all rows the value in column 2 is less than the value in column 3)
Example: p1, p2=3, 2: Result=L0 (since in no rows is the value in column 3 less than the value in column 2)

If la =
4 3 5 6
1 4 2 5
6 3 7 1
3 2 4 4

and ncols=4, and p1, p2=2, 4, then the result would be 4, 3, 5, 6, 1, 4, 2, 5, 3, 2, 4, 4 (i.e. all rows except the 3rd, since the 3rd does not satisfy the condition that the 2nd element is less than the 4th).

If la is an empty list, the result is an empty list.

Rows: @p1 <= @p2, Rows: @p1 = @p2, Rows: @p1 <> @p2, Rows: @p1 >= @p2, Rows: @p1 > @p2

These operate in a similar manner to Rows: @p1 < @p2, but the comparison test is, of course, different.

Cols:@p1 < @p2, Cols:@p1 <= @p2, Cols: @p1 = @p2, Cols: @p1 <> @p2, Cols: @p1 >= @p2, Cols: @p1 > @p2

These operate in a similar manner to the corresponding Rows: operations, but search and return columns rather than rows. For example, Cols: @p1 < @p2 searches for all columns where its p1th item (i.e. in the p1th row from the top) is less than the value in its p2th item.

If la is an empty list, the result is undefined .

Sum of row p1

This takes a single parameter, p1. The sum of the values of the p1th row of the input table is returned as a result.

Example: p1=2: Result=26 (sum of 5, 6, 7, 8)
Example: p1=1, 2, 3: Result=10, 26, 42
Example: p1=2, 4: Result=26, undefined  (since although the second row exists, there is no 4th row, so the result for this parameter is returned as undefined .

If la is an empty list, the result is undefined . Why? There are no rows, so p1 is always invalid.

Sum of column p1

This takes a single parameter, p1. The sum of the values of the p1th column of the input table is returned as a result.

Example: p1=2: Result=18 (sum of 2, 6, 10)
Example: p1=1, 2, 3, 4: Result=15, 18, 21, 24

If la is an empty list, the result is 0 if p1 is a valid column, otherwise it is undefined . Why? Each valid column has no items, and the sum of an empty list is 0.

Product of row p1

This takes a single parameter, p1. The product of the values of the p1th row of the input table is returned as a result.

Example: p1=2: Result=1680 (product of 5, 6, 7, 8)
Example: p1=1, 2, 3: Result=24, 1680, 11880
Example: p1=2, 4: Result=1680, undefined  (since although the second row exists, there is no 4th row, so the result for this parameter is returned as undefined .

If la is an empty list, the result is undefined . Why? There are no rows, so p1 is always invalid.

Product of column p1

This takes a single parameter, p1. The product of the values of the p1th column of the input table is returned as a result.

Example: p1=2: Result=120 (product of 2, 6, 10)
Example: p1=1, 2, 3, 4: Result=45, 120, 231, 384

If la is an empty list, the result is 1 if p1 is a valid column, otherwise it is undefined . Why? Each valid column has no items, and the product of an empty list is 1.

Counts: p1 in rows

This takes a single parameter, p1. The result is a list of the number of occurrences of the value p1 in each of the rows of the input table.

Example: p1=2: Result=1, 0, 0 (2 occurs once in row 1 and 0 times in rows 2 and 3).
Example: p1=2, 7: Result=1, 0, 0, 0, 1, 0 (2 occurs once in row 1 and 0 times in rows 2 and 3; 7 does not appear in row 1, appears once in row 2, and does not appear in row 3).

If la is an empty list, the result is an empty list.

Counts: p1 in cols

This takes a single parameter, p1. The result is a list of the number of occurrences of the value p1 in each of the columns of the input table.

Example: p1=2: Result=0, 1, 0, 0 (2 occurs once in column 2 and 0 times in columns 1, 3 and 4).
Example: p1=2, 7: Result=0, 1, 0, 0, 0, 0, 1, 0 (2 occurs once in column 2 and 0 times in columns 1, 3 and 4; 7 does not appear in columns 1 and 2, appears once in column 3, and does not appear in column 4).

If la is an empty list, the result is a list containing ncols occurrences of 0.

Count p1 in row p2

This takes two parameters, p1 and p2. The result is the number of occurrences of the value p1 in row p2 of the input table.

Example: p1,p2=2, 1: Result=1 (2 occurs once in row 1).
Example: p1,p2=2, 1, 7, 1, 11, 3: Result=1, 0, 1 (2 occurs once in row 1; 7 does not appear in row 1; 11 appears once in row 3).

If la is an empty list, the result is an empty list.

Count p1 in column p2

This takes two parameters, p1 and p2. The result is the number of occurrences of the value p1 in column p2 of the input table.

Example: p1,p2=2, 1: Result=0 (2 occurs zero times in column 1).
Example: p1,p2=2, 1, 7, 1, 11, 3: Result=0, 0, 1 (2 does not appear in column 1; 7 does not appear in column 1; 11 appears once in column 3).

If la is an empty list, the result is 0 if p2 is a valid column, otherwise it is undefined .

Subst. p1 @ [p2, p3]

This takes three parameters p1, p2 and p3. The result list contains the items of the input table, but with the item at cell [p2, p3] (row p2, column p3) replaced by the value p1.

Example: p1,p2...= -89, 2, 3: Result=1, 2, 3, 4, 5, 6, -89, 8, 9, 10, 11, 12
Example: p1,p2...= -89, 3, 4: Result=1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, -89
Example: p1,p2...= -89, 2, 5: Result=undefined (there is no cell at row 2 column 5).

If la is an empty list, the result is undefined .

Resize p1Xp2, fill p3>

This takes three parameters p1, p2 and p3. It is concerned with producing a resized output table based on a given input table.  p1 defines the number of rows in the output table; p2 defines the number of columns in the new table; p3 defines the value to be entered in any new cells that exist in the new table but not the input table.

To explain, consider the input table:

1 2   3   4
5 6   7   8
9 10 11 12

Suppose we wish to resize it to produce an output table with 2 rows and 3 columns only. Any resizing always assumes that the top-left cell of the table (if any) will also be the top-left cell of the resized table. This resizing therefore means that we have to remove from the input table the 3rd row and the 4th column, so that we are left with:

1 2   3
5 6   7

Suppose, instead, that we wish to resize it to produce an output table with 5 rows and 5 columns. Again, the resizing assumes that the top-left cell of the table will also be the top-left cell of the resized table. This resizing therefore means that we have to add in two additional rows at the bottom and a column on the right, so that we are left with:

1 2   3   4   ?
5 6   7   8   ?
9 10 11 12 ?
? ?   ?   ?   ?
? ?   ?   ?   ?

Since the result must contain numbers, we cannot produce a table containing symbols such as a '?'. The parameter p3 is used to specify the value that is placed in every 'new' cell. So, if the three parameters were 5,5,0, the output table would be:

1 2   3   4   0
5 6   7   8   0
9 10 11 12 0
0 0   0   0   0
0 0   0   0   0

We explain this operation by saying that it produces an output table . However, the result of the operation cannot actually be a table but must be a list. The result list therefore consists of the values in the output table selected from each row (left-to-right) starting at the top. The result list may, of course, be displayed as a table in the Table Formatter.

If la is an empty list, the output table will have all its values equal to p3.

If either p1 or p2 has the value 0, the result will be an empty list (L0).

Cells (R:C), value p1>

This finds all the cells in the input table that have the value p1, and returns the row/column pairs for each of these.

If la =
4 3 5 6
1 4 2 5
6 3 7 1
3 2 4 4

and ncols=4, and p1=4, then the result would be 1, 1, 2, 2, 4, 3, 4, 4, as the value 4 is found at cells [1,2], [2, 2], [4, 3] and [4, 4].

If p1=4 2, then the result would be 1, 1, 2, 2, 4, 3, 4, 4, 2, 3, 4, 2.

Clusters

The operations within the Clusters group of operations are all concerned with carrying out some form of search within an input table starting from a given cell within the table, where the starting cell is defined by parameters p1 and p2, which always specify the row and column respectively of the cell.

The operations all involve starting from the starting cell and searching in all directions (both directions along the associated row and column) and, in most cases, all directions diagonally as well.

These operations might be used when looking for or analysing clusters of data in a table, or when analysing positions in a game where the cells of the table represent various states of the game.

To explain these operations, we will use the following 5X5 table (la=3, 4, 5, 4, 4, 2, 5, 4, 2, 1, 1, 5, 4, 4, 2, 2, 4, 3, 2, 1, 4, 4, 4, 2, 4 and ncols=5):

3 4 5 4 4
2 5 4 2 1
1 5 4 4 2
2 4 3 2 1
4 4 4 2 4

We will start searches from the centre cell, i.e. p1=3 and p2=3

In all these operations, the result is undefined if la is an empty list, or if p1 or p2 is not a valid row/column number.

[p1,p2]-> count p3

This operation counts the number of occurrences of the value p3 in every one of 8 directions before a value that is not p3 is found. Note: the starting cell itself is not counted.

The result list, which always contains eight items unless some error results, contains the results for the searches starting in the upwards vertical direction, which we'll call North, or N, and moving clockwise (so the last result is for the NW direction). So, the eight results are for the directions: N, NE, E, SE, S, SW, W, NW.

Example: p1,p2...=3, 3, 4: Result=1, 0, 1, 0, 0, 2, 0, 0
since there is one 4 in the N direction next to the centre cell, 0 in the NE direction, 1 in the E direction, then all other directions have no adjacent 4s except the SW direction where 2 are found, as shown in bold below:

3 4 5 4 4
2 5 4 2 1
1 5 4 4 2
2 4 3 2 1
4 4 4 2 4

[p1,p2]-> cells p3

This operation finds the occurrences of the value p3 in every one of 8 directions before a value that is not p3 is found, and returns in the result list, the row number and column number, in pairs, of the cells in which they occur. In other words, it returns the row and column numbers of all those occurrences counted up in [p1,p2]-> count p3 . Note: the starting cell itself is not included.

The pairs of row/column numbers in the result list are given in the order they are found when following the same search directions/orders as for [p1,p2]-> count p3 .

Example: p1,p2...=3,3,4: Result=2, 3, 3, 4, 4, 2, 5, 1
the 4s found are in cells [2,3], [3,4], [4,2] and [5,1].

[p1,p2]-> 1st not p3

This operation searches the same 8 directions, and in the same order, as [p1,p2]-> count p3 , but finds the first value in each direction that is not equal to p3. If no such value is found, undefined is returned for that direction. Note: the starting cell itself is not included.

Example: p1,p2...=3, 3, 4: Result=5, 2, 2, 2, 3, undefined, 5, 5.

[p1,p2]-> linked +x

This operation carries out a search starting at the start cell [p1, p2] and returns in the result list a set of numbers representing pairs of row/column numbers of all the cells that have the same value as the start cell and are linked to it, either horizontally, vertically or diagonally, by cells that also have the same value as the start cell. That is, it returns the row/column numbers of all cells in the cluster of cells with the same value as the start cell where a path can be traced back to the start cell that includes cells containing only the value of the start cell. Note: the starting cell itself is included as the first pair of row/column pair.

Example: p1,p2...=3, 3: Result=3, 3, 2, 3, 3, 4, 4, 2, 5, 1, 1, 4, 1, 2, 5, 3, 5, 2, 1, 5. This represents the set of cells: [3, 3], [2, 3], [3, 4], [4, 2], [5, 1], [1, 4], [1, 2], [5, 3], [5, 2], [1, 5] as highlighted in the table below:

3 4 5 4 4
2 5 4 2 1
1 5 4 4 2
2 4 3 2 1
4 4 4 2 4

Note that the 4 in the bottom-right cell does not form part of this cluster, as there is no path linking it to the start cell formed of cells containing only 4s.

In case the order is important, the start cell row/column pair comes first, then the row/column pairs for the cells found by a [p1,p2]-> cells p3 type of search starting here, then the row/column pairs for any new cells found as a result of a similar search from each cell found, and so on.

Note that the +x in the operation name represents the fact that this search finds links horizontally, vertically and diagonally.

[p1,p2]-> linked +

This operation carries out a search starting at the start cell [p1, p2] and returns in the result list a set of numbers representing pairs of row/column numbers of all the cells that have the same value as the start cell and are linked to it, either horizontally or vertically, diagonal links ignored, by cells that also have the same value as the start cell. That is, it returns the row/column numbers of all cells in the cluster of cells with the same value as the start cell where a horizonal/vertical path can be traced back to the start cell that includes cells containing only the value of the start cell. Note: the starting cell itself is included as the first pair of row/column pair.

Example: p1,p2...=3, 3: Result=3, 3, 2, 3, 3, 4. This represents the set of cells: [3, 3], [2, 3], [3, 4] as highlighted in the table below:

3 4 5 4 4
2 5 4 2 1
1 5 4 4 2
2 4 3 2 1
4 4 4 2 4

Note that none of the other 4s in the table have horizontal/vertical paths linking them to the start cell formed of cells containing only 4s.

The order of the results is similar to that for [p1,p2]-> linked +x .

Note that the + in the operation name represents the fact that this search finds links only horizontally or vertically, not diagonally.

Graph Plotting

The Graph Plotting operations are concerned with providing results which, given appropriate formatting, can provide rudimentary graphical representations of some input data.

Each operation is best described by considering that it produces an output table . However, the result of the operation cannot actually be a table but must be a list. The result list therefore consists of the values in the output table selected from each row (left-to-right) starting at the top. The result list may, of course, be displayed as a table in the Table Formatter, Graphics Formatter or Animation Zone.

Plot p1 (p2) vs p3 (p4)

This takes four parameters: p1 through to p4. It is a complex operation to explain and understand and is used as a basis for producing a plot of column p1 (on the vertical- or Y-axis) vs column p3 (on the horizontal- or X-axis), each containing numbers that may be real or integers. To produce such plots, it is necessary to group, or normalize, the values in the two lists in some way, which we do here by assigning the values to certain specified ranges or blocks.

The first two, p1 and p2, together define a list of numbers to be mapped to a certain number of equal-sized blocks between the minimum and maximum values of the list of numbers. p1 is the column number of the input table, whose values form the list of numbers, while p2 is a positive integer representing the number of blocks to which these numbers are to be mapped. See List Operation (Row J) Map to p1 blocks for a full description of this mapping (but remember that the 'p1' in that represents the number of blocks, whereas here the number of blocks is represented by parameter p2).

The second two, p3 and p4, represent respectively a second column and associated number of blocks to which the numbers in the column are to be mapped.

To help understand this operation, consider that this operation produces an output table, with p2 rows and p4 columns. Corresponding items on the two sets of equal length mappings (the first containing integers ranging from 1 to p2, the second containing integers ranging from 1 to p4) are taken to specify cells in the output table. The values in the output table represent the number of pairs that specify the given cell. The result, is, of course, just the values of the output table laid out as a list in the usual way.

Example:

Suppose la contains is the list 2, 4, 5, 6, 1, 10, 6, 9, 4, 5, 11, 7, 2, 4, 0, 4, 2, 4, 6, 9 and ncols is 2. The input table is therefore:

2 4.1
5 6
1 10
6 9
4 5.1
11 7
2 4.2
0 4
2 4
6 9

If p1=1, p2=6, p3=2 and p4=4, the two sets of mappings (shown as columns), after mapping the values in the first column to integers 1 -> 6 and those in the second column to 1 -> 4 (in both cases the minimum value maps to 1) are:

2 1
3 2
1 4
4 4
3 1
6 3
2 1
1 1
2 1
4 4
 

The output table, where row 1 is at the top, as usual in Numipulator, and column 1 is on the left, is therefore:

1 0 0 1
3 0 0 0
1 1 0 0
0 0 0 2
0 0 0 0
0 0 1 0

and the result list is 1, 0, 0, 1, 3, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 1, 0

This says that there is only 1 pair of corresponding items that map to cell [1, 1], 3 that map to cell [2, 1], 0 that map to cell [2, 2], and so on.

This could form the basis of a rudimentary plot of column 1 vs column 2, although you would probably wish to flip the table vertically, so that the lowest values on the vertical axis are on the bottom row rather than the top row.

If la is an empty list, the result is undefined .

Histogram p1 (p2)

This takes two parameters: p1 and p2. It is concerned with producing an output table which, when formatted appropriately, represents a rudimentary histogram.

p1 is the number of a column in the input table. The numbers in this column generally represent a count of the occurrence (or frequency) of some factor in a population. The numbers in the column should all be non-negative numbers.

p2 is the number of rows in the output table in which the histogram should be presented.

To explain, suppose we have an input table consisting of just one column as follows (where la=7, 11, 8, 2, 6, 10, 0, 9 and ncols=1)

7
11
8
2
6
10
0
9

Suppose these numbers represent the numbers of people in a small survey that read certain newspapers (7 read paper1, 11 read paper2, and so on). We might want to look at these data graphically in the form of a histogram. If we therefore carry out a calculation with p1=1 (i.e. the first column) and p2=6, the output table would have 6 rows (as defined by p2) and 8 columns (the number of data items in the column) and would look as follows:

7 11 8 2 6 10 0 9
7 11 8 0 6 10 0 9
7 11 8 0 6 10 0 9
7 11 8 0 0 10 0 9
0 11 0 0 0 10 0 9
0 11 0 0 0 0 0 0

If you mentally ignore the 0s (or physically remove them), the table looks as follows:

7 11 8 2 6 10   9
7 11 8   6 10   9
7 11 8   6 10   9
7 11 8     10   9
  11       10   9
  11            

you will see that this table contains a number of downward-pointing column bars where the 'length' of the column bar is roughly proportional to the number of people that read each paper. The actual number reading it is given by the number making up the bar.

The output table is produced as follows:

  • the number of rows in the output table = p2;
  • the number of columns in the output table = the number of values in the input column;
  • each of the columns in the output table is associated with the corresponding value in the input column;
  • the interval for each row = (the maximum value in the input column/p2) rounded up; so, in the example, the interval of each row is 11/6 rounded up = 2;
  • each row has a lower limit = (row number-1)Xinterval; so, in the example, row 1 (the top row) has a lower limit=0, row 2 has a lower limit = 2 and row 6 has a lower limit = 10.
  • for each cell, if the value associated with the column > (but not equal to) the lower limit of its row, its value is the value associated with the column; otherwise it is 0.

If la is an empty list, the result is undefined .

Line List Functions

The Line List Functions provide the ability to specify a List Function to Number or List Function to List to the individual rows or columns of the table, as defined for Rows C and H. These functions are applied by specifying the code for the functions to be applied, as given when the Codes link is pressed. Important: the List Function is applied to each row or column in turn, and the results for each follow on from each other. The conceptual result may not itself be a table: applying the Remove duplicates function, for example, could result in the results for each row or column having different lengths.

The examples below assume a 4-column input table, with la defined as follows:
20 10 40 90
80 70 50 60
and p1=1

Ind. rows to num p1

Result=160, 260, as code 1 for List Function to Number means Sum of list values, and 20+10+40+90=160 and 80+70+50+60=260.

Note: If la=L0, the result is L0, as there are no rows to sum.

Ind. cols to num p1

Result=100, 80, 90, 150, as code 1 for List Function to Number means Sum of list values, and 20+80=100, 10+70=80, 40+50=90 and 90+60=150.

Note: If la=L0, the result is 0, 0, 0, 0, as the sum of each empty column is 0.

Ind. rows to list p1

Result=10, 20, 40, 90, 50, 60, 70, 80, as code 1 for List Function to List means Sort (ascending), so each row is sorted individually.

Note: If la=L0, the result is L0, as there are no rows to sort.

Ind. cols to list p1

Result=20, 80, 10, 70, 40, 50, 60, 90, as code 1 for List Function to List means Sort (ascending), so each column is sorted individually. Please note that this may not be the result you were expecting, as taking the table as a whole and sorting each individual column would result in the table
20 10 40 60
80 70 50 90
giving the result 20, 10, 40, 60, 80, 70, 50, 90. However, the individual columns are sorted individually, and the results for each follow on from each other.

Note: If la=L0, the result is L0, as the sort of each empty column is L0.

Meta Ops

The Meta Ops operations provide the ability to specify the function or operation to be carried out on a table by means of a code. There are five of these:

  • Function=p0
  • Op=p0:p1
  • Op=p0:p1,p2
  • Op=p0:p1,p2,p3
  • Op=p0:p1,p2,p3,p4

In all cases, p0 represents the code for the function or operation, while the remaining parameters (if any) represent the parameters of the operation specified by the code. The codes can be found by clicking on the Codes link near the top of the main Numipulator page.

Please note the following carefully, as an example: Op:p0:p1,p2,p3 has a total of 4 parameters: the first, p0, represents the number code of the operation, which can be found under Table Operations - 3 parameters: in the list of Codes. The remaining three, p1, p2 and p3 correspond to p1, p2, p3 in the description of the operation above.

In the following examples, the input table is a 4-column table:

1 2   3   4
5 6   7   8
9 10 11 12

Example: Operation selected is Func=p0; parameter(p0)=15
Op Code 15 under Table Functions means Shift rows up so the result will be:

5 6   7   8
9 10 11 12
1 2   3   4

Example: Operation selected is Op(p1):p2,p3; parameters (p0, p1, p2)=2,2,3
Op Code 2 under Table Operations - 2 parameters means Swap rows p1 & p2 so the result will have rows 2 and 3 swapped:

1 2   3   4
9 10 11 12
5 6   7   8

Table Function - Row T

This takes a list, la, and a number, ncols, as inputs. Together these represent an input table (see Tables), where la represents the cell values and ncols represents the number of columns in the input table.

The functions include many Transformations. These take this input table, which has both shape and values, and produce an output table. The shape of the output table is, depending on the Transformation function, either the same as the input table, i.e. with ncols columns, or else that shape turned through 90 degrees, i.e. with ncols rows.  The values in the cells are dependent on the Transformation function.

The result list for the functions that are Transformations consists of the values in the output table selected from each row (left-to-right) starting at the top. So, for example, if the output table were:

4 3 5 6
2 1 8 5
4 2 1 7

the result list would be 4, 3, 5, 6, 2, 1, 8, 5, 4, 2, 1, 7

The result list for the functions that are Other represents some property of the output table, e.g. the ranks of the columns when the table is sorted according to its columns.

Note: The results for an empty input list, la, are described below for all functions.

All the functions described below, except the Sort... , Shift... , Permutation... , Ranks..., and Remove duplicates functions, assume that la=1, 2, 3, 4, 5, 6 and ncols =3, so that the input table is

1 2 3
4 5 6

Transformations

For all the Transformation functions, if la is an empty list and ncols is a positive integer, the result is an empty list.

Transpose row/col

Rows and columns are swapped around, so that the top row becomes the leftmost column, the second row becomes the second column, and so on.  Note: the output table has ncols rows.

1 4
2 5
3 6

Flip horizontally

The leftmost column of the input table becomes the rightmost column of the output table, the second column becomes the second-to-right column of the output table, and so on. The output table has ncols columns.

3 2 1
6 5 4

Flip vertically

The top row of the input table becomes the bottom row of the output table, the second row becomes the second to bottom row of the output table, and so on. The output table has ncols columns.

4 5 6
1 2 3

Rotate 90 degs

The input table is turned 90 degrees clockwise. The output table has ncols rows.

4 1
5 2
6 3

Rotate 180 degs

The input table is turned 180 degrees clockwise. The output table has ncols columns.

6 5 4
3 2 1

Rotate 270 degs

The input table is turned 270 degrees clockwise. The output table has ncols rows.

3 6
2 5
1 4

Sort... functions

The Sort... functions are all concerned with sorting the rows or columns. In all cases, the shape of the output table is the same as the input table, with ncols columns. To explain these, an input table with la=

4 3 2 2
2 1 8 8
4 2 1 1

and ncols=4 is used for the examples.

Sort rows (asc)

This function sorts the rows in ascending order (from top to bottom), where the primary key is the value in the first column. If the values in the first column are identical, then the values in the second column are used as a secondary key. This pattern continues, if necessary, for all columns.

So, the output list (shown as a table here) is:

2 1 8 8
4 2 1 1
4 3 2 2

Note: Because the items is the first column (the primary key) of 4 2 1 1 and 4 3 2 2 are identical, the items in the second column (the secondary key) are used to determine the order. This results in 4 2 1 1 being considered less than 4 3 2 2.

Sort rows (desc)

This is similar to Sort rows (asc) but the rows are placed in descending order top to bottom. The output list (shown as a table) is:

4 3 2 2
4 2 1 1
2 1 8 8

Sort cols (asc)

This sorts the columns in ascending order from left to right, where the primary key is the value in the first row. If the values in the first row are identical, then the values in the second row are used as a secondary key. This pattern continues, if necessary, for all rows.

The output list (shown as a table) is:

2 2 3 4
8 8 1 2
1 1 2 4

Sort cols (desc)

This is similar to Sort cols (asc.) but the columns are placed in descending order left to right. The output list (shown as a table) is:

4 3 2 2
2 1 8 8
4 2 1 1

Sort ind. rows (asc)

This function sorts the values in each of the individual rows in ascending order.

So, the output list (shown as a table here) is:

2 2 3 4
1 2 8 8
1 1 2 4

Sort ind. rows (desc)

This function sorts the values in each of the individual rows in descending order.

So, the output list (shown as a table here) is:

4 3 2 2
8 8 2 1
4 2 1 1

Sort ind. cols (asc)

This function sorts the values in each of the individual columns in ascending order.

So, the output list (shown as a table here) is:

2 1 1 1
4 2 2 2
4 3 8 8

Sort ind. cols (desc)

This function sorts the values in each of the individual columns in descending order.

So, the output list (shown as a table here) is:

4 3 8 8
4 2 2 2
2 1 1 1

Shift... functions

The Shift... functions are all concerned with shifting rows or columns by one row/column in a certain direction. In all cases, the shape of the output table is the same as the input table, with ncols columns. To explain these, the same input table as for the Sort... functions above will be assumed.

Shift rows up

The output list (shown as a table here), where row 2 has become row 1, row 3 has become row 2 and row 1 has moved to the end, is:

2 1 8 8
4 2 1 1
4 3 2 2

The other Shift... functions operate in a similar way

Permutation: Rows

The individual rows remain intact, but their relative positions change pseudo-randomly. One possible result, using the same input table as for the Sort... functions, is:

4 2 1 1
2 1 8 8
4 3 2 2

Permutation: Cols

This operates similarly, but pseudo-randomly re-orders the column positions.

Rows bottom-right  (and similar operations)

The four functions Rows top-left, Rows top-right, Rows bottom-right, and Rows bottom-left all have an output table the same shape as the input table, i.e. with ncols columns. They specify that the values in the original input list, la, should be entered into the output table in rows, starting at the specified cell. Each row is filled in the same direction - the direction being dictated by the starting cell.

Reminder: All the functions concerned with laying out the values in a particular way assume an input table as follows:

1 2 3
4 5 6

So, Rows bottom-right yields the follow output table:

6 5 4
3 2 1

Notes: 
Rows bottom-right is the same transformation as Rotate 180 degs. 
Rows top-right is the same transformation as Flip horizontally. 
Rows bottom-left is the same transformation as Flip vertically.

Cols bottom-right (and similar operations)

The four functions Cols top-left, Cols top-right, Cols bottom-right, and Cols bottom-left all have an output table the same shape as the input table, i.e. with ncols columns. They specify that the values in the original input list, la, should be entered into the output table in columns, starting at the specified cell. Each column is filled in the same direction - the direction being dictated by the starting cell. So, Cols bottom-right yields the follow output table:

6 4 2
5 3 1

S-Rows bottom-right  (and similar operations)

The four functions S-Rows top-left, S-Rows top-right, S-Rows bottom-right, and S-Rows bottom-left all have an output table the same shape as the input table, i.e. with ncols columns. They specify that the values in the original input list, la, should be entered into the output table in rows, starting at the specified cell. In contrast to the basic Rows transformations, alternate rows are laid out in opposite directions, so that the values from the list snake (hence the S) through the table. So, S-Rows bottom-right yields the follow output table:

4 5 6
3 2 1

S-Cols bottom-right (and similar operations)

The four functions S-Cols top-left, S-Cols top-right, S-Cols bottom-right, and S-Cols bottom-left all have an output table the same shape as the input table, i.e. with ncols columns. They specify that the values in the original input list, la, should be entered into the output table in columns, starting at the specified cell. In contrast to the basic Cols transformations, alternate columns are laid out in opposite directions, so that the values from the list snake (hence the S) through the table. So, S-Cols bottom-right yields the follow output table:

6 3 2
5 4 1

Other

Reminder: All the functions described below, except the Ranks..., and Remove duplicates functions assume an input table as follows:

1 2 3
4 5 6

Number of rows

This function produces a list with a single number in it: the number of rows in the table. For the example, the result would be the list: 2.

Numbered rows

This produces a table with an additional column on the left containing the row numbers.

1 1 2 3
2 4 5 6

Numbered cols

This produces a table with an additional row at the top containing the column numbers.

1 2 3
1 2 3
4 5 6

If la is an empty list, the result is the column numbers for ncols.
For example, if la=L0 and ncols=3, the result is 1,2,3. Why? Although the list is empty, the table still has a certain number of columns, which can be numbered.

Numbered rows/cols

This produces a table with an additional column on the left containing the row numbers, and an additional row at the top containing a 0 followed by the column numbers (as above).

0 1 2 3
1 1 2 3
2 4 5 6

If la is an empty list, the result is a 0 followed by the column numbers for ncols.
For example, if la=L0 and ncols=3, the result is 0,1,2,3.

Head: 1st row

This produces a list containing just the items of the 1st row. The result for the example is:

1 2 3

Tail: all but 1st row

This produces a list all the items of the table except for the 1st row. The result for the example is:

4 5 6

Sums of rows

This function produces a list of the sums of each of the rows. The result for the example is:

6, 15.

If la is an empty list, the result is an empty list. Why? There are no rows so no row totals

Sums of cols

This function produces a list of the sums of each of the columns. The result for the example is:

5, 7, 9.

If la is an empty list, the result is a list of length ncols, each item having a value=0. Why? There are ncols columns, each with zero items, so the total of each column is zero.

Ranks ... functions

The Ranks... functions are all concerned with sorting the rows or columns and returning, as a list, the ranks of the rows or columns in the input table. Note: if two or more of the rows or columns (as appropriate) are identical, their ranks will also be identical. If, for example, there are 3 identical rows or columns ranked 4th, the ranks 5 and 6 will not appear in the output list; the next rank (if any) will be 7.

To explain these functions, an input table with la=

4 3 2 2
2 1 8 8
4 2 1 1

and ncols=4 is used for the examples.

Ranks rows (asc)

This function considers the table that would result from sorting the rows in ascending order (from top to bottom), namely:

2 1 8 8
4 2 1 1
4 3 2 2

The result of the function is a list of the rankings of each of the input table rows (i.e. the positions of the rows from the input table as found in the sorted table). In this example, the list returned is therefore 3, 1, 2 as the 1st row of the input table is the 3rd row of the sorted table, the 2nd row of the input table is the 1st row of the sorted table, and so on.

If la is an empty list, the result an empty list. Why? There are no rows so no row rankings.

Ranks rows (desc)

This is similar to Ranks rows (asc) but the rows of the output table are placed in descending order top to bottom. The result is:

1, 3, 2

Ranks cols (asc)

This is similar to Ranks rows (asc) but in this case it considers the table that would result from sorting the columns in ascending order (left-to-right), namely:

2 2 3 4
8 8 1 2
1 1 2 4

The result is therefore:

4, 3, 1, 1

Note: there are two identical columns, both = 2, 8, 1, so both are ranked 1 (the lowest). There is therefore no column in the input table ranked 2.

If la is an empty list, the result is a list of length ncols, each value on the list = 1. Why? There are ncols columns, each having zero items, so each column is identical so each has a rank of 1.

Ranks cols (desc)

This is similar to Ranks cols (asc.) but the columns are placed in descending order left to right. The result (showing a joint 3rd rank) is:

1, 2, 3, 3

Remove duplicate rows

If the input table contains duplicate rows, all but the first of these (top-to-bottom) are deleted.

For example, if the input table (written as a table with ncols=2) were:

3 4
2 3
1 2
2 3
7 6
1 2
2 3

then the lower rows with values 2, 3 and 1, 2 would be removed and the output table would be:

3 4
2 3
1 2
7 6

and so the result would be 3, 4, 2, 3, 1, 2, 7, 6.

If la is an empty list, the result is an empty list.

Remove duplicate cols

If the input table contains duplicate columns, all but the first of these (left-to-right) are deleted.

For example, if the input table (written as a table with ncols=8) were:

2 3 4 3 5 1 2 2
1 4 7 4 6 1 1 9

then the output table would be:

2 3 4 5 1 2
1 4 7 6 1 9

and so the result would be 2, 3, 4, 5, 1, 2, 1, 4, 7, 6, 1, 9.

If la is an empty list, the result is an empty list.

Table Construction - Row U

The first two inputs for Table Construction are a list, la, and a number, ncols. Together these represent an input table (see Tables), where la represents the cell values and ncols represents the number of columns in the input table.

Merge table lc @ col d

This is concerned with simple merging of two tables, each with the same number of rows. List lc specifies the values of the table to be merged in, laid out in the usual way (left-to-right for each row of the table). The value d specifies the column at which this is to be merged in.

The simplest merge is where table given by lc is placed to the right of the table defined by la and ncols. That is, the first column of the table given by lc becomes the ncols+1th column of the resulting table.

So, if la = 1 2 3 4 5 6 7 8 9 10 11 12 and ncols=4, then the input table is:

1 2 3 4
5 6 7 8
9 10 11 12

which has 3 rows.

If lc is specified as 20 21 22 23 24 25 26 27 28, then the table to be merged, which is assumed to have 3 rows, is

20 21 22
23 24 25
26 27 28

If the value of d is specified as 5 (ncols+1), then the resulting table is:

1 2 3 4 20 21 22
5 6 7 8 23 24 25
9 10 11 12 26 27 28

with the resulting list just being the values extracted from this table in the usual way:
1 2 3 4 20 21 22 5 ... 27 28.

If d is specified as 1, then the table given by lc becomes the 1st column of the resulting table, i.e. the table given by lc is placed to the left of the main input table:

20 21 22 1 2 3 4
23 24 25 5 6 7 8
26 27 28 9 10 11 12

If d is specified as 3, then the table given by lc becomes the 3rd column of the resulting table, i.e.

1 2 20 21 22 3 4
5 6 23 24 25 7 8
9 10 26 27 28 11 12

Line Change

Each of the Line Change operations takes the input table, and constructs an output table . The operations are all concerned with inserting additional sets of row or column values, possibly associated with deletion/replacing of existing rows or columns.

The remaining two inputs are a list, lc, which represent a set of values that are to be put into the table in some way, and d, a number, which represents a row or column number in the table. In all cases, the number of values in lc must correspond to a whole number of rows or columns, as appropriate for the operation. If not, an error results.

The result list consists of the values in the output table selected from each row (left-to-right) starting at the top.

Note: The results for an empty input list, la, are described below for all operations.

The examples for the operations described below assume that la=1, 2, 3, 4, 5, 6 and ncols =3, so that the input table is

1  2  3
4  5  6

Insert lc @ row d

This inserts the additional rows defined by the values in lc in the table, with the first of these additional rows becoming the dth row of the output table.

Example: lc = 7, 8, 9, 10, 11, 12 and d = 2

Output table:
1  2  3
7  8  9
10 11 12
4  5  6

Example: lc = 7, 8, 9, 10, 11, 12 and d = 1

Output table:
7  8  9
10 11 12
1  2  3
4  5  6

Example: lc = 7, 8, 9, 10, 11, 12 and d = 3 (although the input table has only 2 rows, d=3 is a valid input which indicates that the new rows should be inserted after the existing rows, i.e. the first one is row 3 of the output table).

Output table:
1  2  3
4  5  6
7  8  9
10 11 12

This is a useful function to insert a list of arbitrary length into another list at a given position, by defining ncols=1. For example, if lc = 1, 2, 3, 4, 5, ncols=1, lc=7, 8, 9 and d=3, the result is 1, 2, 7, 8, 9, 3, 4, 5

If la is an empty list, the result is lc (assuming the length of lc corresponds to the number of columns) if d=1, otherwise it is undefined .

Del. row d & insert lc

This firstly deletes the existing row d of the input table, then inserts the additional rows defined by the values in lc in the table, with the first of these additional rows becoming the dth row of the output table.

Example: lc = 7, 8, 9, 10, 11, 12 and d = 2
Output table:
1  2  3
7  8  9
10 11 12

Example: lc = 7, 8, 9, 10, 11, 12 and d = 1
Output table:
7  8  9
10 11 12
4  5  6

Example: lc = 7, 8, 9, 10, 11, 12 and d = 3  
This produces an error, as there is no 3rd row in the input table

Example: lc = L0 and d = 1
Output table:
4  5  6

This deletes the first row and inserts an empty list, i.e. no rows.  Using an empty list as input lc is a way of deleting a given row.

If la is an empty list, the result is undefined . Why? There are no rows, so none can be deleted.

Subst. lc @ row d

Starting at row d of the input table, the rows defined in lc are entered into the table. These rows are substituted for (i.e. replace) the corresponding rows in the input table (assuming they exist).

Example: lc = 7, 8, 9, 10, 11, 12 and d = 1

Output table:
7  8  9
10 11 12
(rows 1 and 2 of the input table are replaced by the rows defined in lc)

Example: lc = 7, 8, 9, 10, 11, 12 and d = 2

Output table:
1  2  3
7  8  9
10 11 12
(row 2 of the input table is replaced, but the second row of lc is appended to the end of the table, as there is no corresponding row to replace)

Example: lc = 7, 8, 9, 10, 11, 12 and d = 3 (although the input table has only 2 rows, d=3 is a valid input which indicates that the new rows should be placed after the existing rows, i.e. the first one is row 3 of the output table - and there are no rows to replace).

Output table:
1  2  3
4  5  6
7  8  9
10 11 12

Example: lc = L0 and d = 1

Output table:
1  2  3
4  5  6
(No rows to insert, so none to replace/delete).

If la is an empty list, the result is lc (assuming the length of lc corresponds to the number of columns) if d=1, otherwise it is undefined .

Insert lc @ col d

This inserts the additional columns defined by the values in lc in the table, with the first of these additional columns becoming the dth column of the output table.

Example: lc = 7, 8, 9, 10 and d = 2

Output table:
1  7 9 2  3
4  8 10 5  6

Important: Remember that the list lc in this and the other 'col' operations defines a sequence of column values laid out top to bottom. So, the two sets of column values are 7, 8 and 9, 10 (not 7, 9 and 8, 10 as you might be tempted to think). N.B. This is quite different from Merge table lc @ col d.

The other 'col' operations, Del. col d & insert lc and Subst. lc @ col d, operate in a similar way to the 'row' operations, but on columns instead of rows.

For all the 'col' operations, if la is an empty list and lc is an empty list and d is a valid column number, the result an empty list, otherwise it is undefined . Why? The length of a column on the input table is 0, so all columns inserted or substituted must also have 0 length.

Cell Change

Cell Change operations take the input table and produce an output table that has the same size and shape as the input table. The values of the cells of the output table are the same as the input table, unless explicitly changed by the operation (but see below for the impact of input d).

These functions are primarily (but not exclusively) of value when producing graphical outputs.

Input lc consists of sets of parameters/values associated with the changes.

If input d is defined as -1 (or any negative value), all the final values in the output table are multiplied by -1. This can be useful if you wish to operate with positive numbers for colour formats, as it enables you to produce negative (borderless) values without using an additional numipulation box. If d is 0 or positive, no such change is made to the values.

In all cases, more than one set of parameters/values may be supplied. The changes are made one set at a time (left to right). These changes may conflict, so that a change made to a cell by one set may be overwritten by a change made by a set further to the right.

The result list consists of the values in the output table selected from each row (left-to-right) starting at the top. 

Because input lc contains numbers/parameters that represent different things, the examples below use the following convention:
- two numbers separated by only a comma represent a row and column number, i.e. a position in the grid;
- two numbers separated by only a semicolon represent the height and width of a block;
- the values associated with the change (maybe the colour/format codes) follow a colon;
- other meanings are shown as a comment within braces/curly brackets;
- sets of parameters/values are shown on new lines.

Change cell values

The input lc represents a list of parameters. These parameters are in groups of three, where the first represents a row number, the second represents a column number and the third represents a value. Any number of groups of three parameters may be specified in lc. Note: if the number of parameters is not a multiple of three, any surplus ones are ignored.

The way this operation operates is that each group of three parameters (rownum, colnum, val) is taken in turn. The value of the cell at [rownum, colnum] is changed to val.

The examples below assume that la=1, 2, 3, 4, 5, 6 and ncols =3, so that the input table is

1  2  3
4  5  6

Input d is defined as 0.

Example: lc=
2,1 : 13
1,3 : 6

The output table becomes

1  2  6
13 5  6

That is, cell [2,1] has been changed to 13 and cell [1,3] has been changed to 6.

Example: lc=
2,1 : 13
1,3 : 6
2,1 : 10

The output table becomes

1  2  6
10 5  6

In this case, cell [2,1] was first changed to 13 and then to 10, so ends up as 10.

Note: if any set of three parameters includes an invalid cell specification, the result is undefined . So, if la is an empty list, any changes specified in lc will result in undefined .

Change block values

This is concerned with changing the values of a block of items in a table. The input lc represents sets of parameters and values. The first 4 numbers in any set represent:

  • the row number of the item at the top left corner of the block,
  • the column number of the item at the top left corner of the block,
  • the height (number of rows) of the block,
  • the width (number of columns) of the block.
The remaining numbers in the set are the values to be used in the change. The number of values must, of course, be the height x the width of the block.

One set of parameters/values follows on immediately from the preceding set. These may specify changes to values already changed by a preceding set of parameters.

Note: if there are 4 or fewer surplus numbers in lc, these are ignored; however, a set of 5 or more numbers is assumed to form a set of parameters/values. These must specify correct row and column numbers, and include the number of values implied, otherwise the output is undefined.

Note: If the height or width of the block is less than 1, the result is undefined.

The examples use the same input table as above:

1  2  3
4  5  6

Input d is defined as 0 in these examples.

Example: lc=
1,2 2;2 : 71 72 73 74 (i.e. a 2x2 block where the top-left cell of the block is at row 1 column 2)

The output table becomes

1  71  72
4  73  74

Example: lc=
1,2 2;2 : 71 72 73 74
2,1 1;2 : 87 88

The output table becomes

1  71  72
87  88  74

where the value 73 replaced 5, but this in turn was replaced by 88.

Change block transp.

In this, 'transp' means transparently. It is intended for graphical uses. It is identical to Change block values above except that any values of 0 in lc are ignored, leaving the value already input or determined for that cell.

Example, same la as above: lc=
1,2 2;2 : 71 72 73 74
2,1 1;2 : 87 0

The output table becomes

1  71  72
87  73  74

where the value 73 replaced 5, but no further change was made to the cell in this position as a 0 was found.

So, if you wish to add a complex shape to a graphic, ensure that a 0 occurs in the block that includes the shape wherever you wish the background to be displayed.

Example: la =

5 5 5 5 5 5
5 5 5 5 5 5
5 5 5 5 5 5
5 5 5 5 5 5
5 5 5 5 5 5
5 5 5 5 5 5
5 5 5 5 5 5

ncols=6
lc=2,2 5;4 :
3 3 3 3
3 0 0 0
3 3 3 3
3 0 0 0
3 3 3 3

The output table becomes

5 5 5 5 5 5
5 3 3 3 3 5
5 3 5 5 5 5
5 3 3 3 3 5
5 3 5 5 5 5
5 3 3 3 3 5
5 5 5 5 5 5

- a red E on a blue background when displayed in the Animation Zone.

Fill block values

This is also concerned with changing the values of a block of cells in a table, but using the same value in relation to each cell rather than a list of different values. This allows a block of a table to be filled with the same value. The input lc represents sets of 5 parameters/values. These represent:

  • the row number of the item at the top left corner of the block,
  • the column number of the item at the top left corner of the block,
  • the height (number of rows) of the block,
  • the width (number of columns) of the block,
  • the value to be used in the change - the same value for each cell of the block.

Note: any surplus parameters/values are ignored.

Note: If the height or width of the block is less than 1, the result is undefined.

The examples use the same input table as above:

1  2  3
4  5  6

Input d is defined as 0 in these examples.

Example: lc=
1,2 2;2 : 71

The output table becomes

1  71  71
4  71  71

Example: lc=
1,2 2;2 : 71
2,1 1;2 : 87

The output table becomes

1  71  71
87  87  71

where the value 71 replaced 5, but this in turn was replaced by 87.

Edge block values

This is concerned with changing the values of certain elements of a block of cells in a table, namely those cells that form the edge of a block (some form of rectangle). It is identical to Fill block values above, except only the outer edge of the block is filled with the value specified.

Fill circle values

This is concerned with changing the values of certain elements of a block of cells in a table, namely those cells that approximate to a circle. Each cell of the circle is filled with the same value. Clearly this is valuable for graphical applications. The input lc represents sets of 4 parameters/values. These represent:

  • the row number of the item at the top left corner of the block containing the circle,
  • the column number of the item at the top left corner of the block containing the circle,
  • the diameter (number of cells) of the circle (the height and width of the block),
  • the value to be used in the change - the same value for each cell in the circle.

Note: any surplus parameters/values are ignored.

Note: If the diameter of the block is less than 1, the result is undefined, as it is if the diameter is not an integer.

Note: As the diameter decreases, the shapes become less circular.

Edge circle values

This is concerned with changing the values of certain elements of a block of cells in a table, namely those cells that approximate to the edge of a circle. It is identical to Fill circle values above, except only the edge of the circle (generally one but maybe two cells width) is filled with the value specified.

Line values

This is concerned with changing the values of cells that approximate to a straight line between two cells of a table. It is mainly of use in graphical applications. The input lc represents sets of 5 parameters/values. These represent:

  • the row number of the first end of the line,
  • the column number of the first end of the line,
  • the row number of the second end of the line,
  • the column number of the second end of the line,
  • the value to be used in the change - the same value for each cell of the line.

Note: any end may be considered the first end. Note: any surplus parameters/values are ignored.

For a 100x100 input table, if lc = 1,1 100,100 : -3, then a diagonal red line from the top-left corner to the bottom-right corner is shown when the output table is displayed in the Animation Zone.

Items Operation - Row V

This takes two lists of items as inputs, [a] and [b], and produces a list as its result (the same length as [a]).  For each item, a, on [a], and its corresponding item, b, on list [b] (which cycles in the standard Numipulator way), the selected operation is carried out as specified in Number Operation, and a corresponding item is generated on the result list.

Add: a+b (as an example)

Example: [a]=2, 4, 5, 7; [b]=7; Result=9, 11, 12, 14.   
Example: [a]=2, 4, 5, 7; [b]=7, -2, 3, 8: Result=9, 2, 8, 15

Items Function - Row W

This takes a list of items as input, [a], and produces a list as its result (the same length as [a]). For each item, a, on [a], the selected function is carried out as specified in Number Function, and a corresponding item is generated on the result list.

Square (as an example)

Example: [a]=2, 4, 5, 7; Result=4, 16, 25, 49. 
Example: [a]=-2; Result=4

Items Coded Operations - Row X

These functions all have a list of items as their first input, [a], and a set of numbers in the second list, lb, that contains some numbers that represent operator codes and some that are numbers on which the operators operate. In all cases, the list of results produced is the same length as [a]. The second list, lb, always begins with an operator code (unless it's empty), which is an incomplete expression. For each item, a, on [a], the number a is placed in front of the numbers in lb to produce a complete expression. This is evaluated to give the result for a. The three functions below correspond to the related functions in List Function to Number.

Calculator (a Op Num...)

Unless empty, lb consists of the following sequence: Op Num Op Num..., where Op is a number representing a number operator (see the Codes link near the top of Numipulator for these). Once the item from [a] is placed in front of this sequence, a complete expression, a Op Num Op Num... is produced. This is evaluated exactly as described in the Calculator function of List Function to Number.

Reminder: the operator codes begin:
1 means +
2 means -
3 means x
4 means /

Remember, also, that it is much easier to understand if you use the +-x/ button under the Mappings field, so that you can write + to represent 1, - to represent 2, x to represent 3, and so on in lb.

Remember also that, as described in the Calculator function in the List Function to Number set of functions, the string may also include number function codes, through the use of the mock operator code 100.

Example: if [a] = 9, 10, 11, 12 and lb=2 1 9 10 1 1 or - 1 DIV 10 + 1 (if the +-x/ mappings are used), then the result is 1 1 2 2.
Explanation:
The first item result is derived by placing 9 before - 1 DIV 10 + 1 to give 9 - 1 DIV 10 + 1, and carrying out simple left-to-right calculation (like with a calculator), i.e. ((9 - 1) DIV 10) + 1, which equals 1.
The 4th item result is derived by placing 12 before - 1 DIV 10 + 1 to give 12 - 1 DIV 10 + 1, and carrying out simple left-to-right calculation (like with a calculator) i.e. ((12 - 1) DIV 10) + 1, which equals 2.
Note: this is a way of calculating the row number for indices given in [a], for a table having 10 columns.

An example using number functions is [a] = 1 2 3 and lb = 100 1 3 pi (or f:Square x pi, if using suitable text to number mappings), which will result in the areas of circles with radii of 1, 2 and 3; the fornula for each one is equivalent to πr2, e.g. 3 f:Square x pi for the last item in the list.

Expression (a Op Num...)

The calculation of the completed expression a Op Num Op Num... is exactly as described for the Expression function in the List Function to Number set of functions. That is, the evaluation follows the conventional operator precedence for the main operators (+, -, *, / and ^ (power)), as in the BODMAS/PEMDAS convention, rather than simple left-to-right evaluation as with Calculator.

Example: if [a] = 9, 10, 11, 12 and lb=2 1 9 10 1 1 or - 1 DIV 10 + 1 (if the +-x/ mappings are used), then the result is 10 11 12 13.

Case: 1st (a Op Num...)

The general form of lb is Op Num Num Op Num Num ... (Num), where Op is an integer from 1 to 6 or 14 to 19 representing a comparison operator. The evaluation of the completed expression a Op Num Num Op Num Num ... (Num) is exactly as described for the Case: 1st function in the List Function to Number set of functions.

Example: Suppose [a] has the value 6 2 4 3 and lb has the value:
1 4 101
3 4 102
3 5 103
104

This means that for any value a on [a],
if a < 4, the result is 101, else if a = 4, the result is 102, else if a = 5, the result is 103, else the result is 104.

So, the result is 104 101 102 101.

Memory Number - Row Y and Memory List - Row Z

The Memory Number and Memory List numipulation boxes are possibly the most difficult to understand. They are concerned with enabling you to carry out a series of calculations in which results from one press of the = button are used as inputs to the next.

If you don't use Memories, and keep the same values in all your numipulation boxes, you'd expect the results to be the same every time you press the = (Calculate) button (unless you've generated a list containing random numbers, carried out some random permutation of a list, or used now as an input): same inputs, so same results. Memories essentially allow Numipulator to remember a result from one press of an = button and use that as an input to the next press of an = button, so that different results may be generated (it also works from one Repeat cycle to the next - see later). The behaviours of Memory Numbers and Memory Lists are identical.

During a calculation, two values associated with a Memory numipulation box may be evaluated:

  • The first, its current value, is specified by the mem field, second from bottom. This, like any other input field, may contain a number or a reference name (or a mixture of these in the case of a list). Once evaluated, the resulting value, which is the value that is used whenever the numipulation box is referred to in other boxes, is output into the result field at the bottom (next to the reference name, as with most other numipulation boxes). However, an unusual feature of the mem field is that you cannot type into it. Where the specification comes from is described below.
  • The second value that is derived during a calculation is based on the value or definition given in the next field, just above the mem field. You can type into this, and can specify a value, including the use of reference names, as you can with any other input field. The value is calculated just like any other value during the calculation; however, it is not, and cannot be, used as an input value to any numipulation box during this calculation. At the end of the calculation, the resulting value is output into the mem field. Now, because the value specified in the mem field becomes the value of the bottom or reference field, this means that this value will be the value of the reference field during the next calculation. The mem field is, therefore, the key to a Memory numipulation box: a result from one calculation cycle becomes an input/value in the next calculation cycle.
So, the value specified in the next field, becomes the value of the mem field at the end of calculation, which then becomes the value of the reference field during the next calculation. But where does the specification for the mem field come from initially, as you cannot type into it? If the mem field is found to be empty at the beginning of a calculation, the specification found in the init field (the top field of a Memory numipulation box - one you can type into) is moved into the mem field, ready for evaluation.

The best way to demonstrate this is to provide an example, which just makes use of one Number Operation and one Memory Number:

Number Operation
*1
*b
*A1
  
  i  
      
  X  
Memory Number
*init
*next
*mem
*Y1
  
  i  
      
  X  

This shows the state before the = button has been pressed, where the init field for Y1 is specified as 4, its next value is specified as A1, and the value of A1 is specified as Y1+1 (but none of these have been evaluated yet).

After pressing =, the boxes will look as follows:

Number Operation
*1
*b
*A1
  
  i  
      
  X  
Memory Number
*init
*next
*mem
*Y1
  
  i  
      
  X  

The specification in the init field, 4, would have been transferred into the mem field, as it was initially empty, and this has ended up as the result, or value, of Y1, as shown.

This value has been used to yield the value 5 for A1, as shown.

The next field is defined as A1, so the resulting value, 5, has been put into the mem field (overwriting the 4 that had been transferred there at the beginning). This will be the value of Y1 in any next cycle.

After pressing = again, the boxes will look as follows, since the value of Y1 is evaluated as 5 (from mem at the beginning of the calculation), and A1 is evaluated as Y1+1=5+1, i.e. 6, which also becomes the new value of mem. Note that the init field has not been used this time, as mem was not empty.

Number Operation
*1
*b
*A1
  
  i  
      
  X  
Memory Number
*init
*next
*mem
*Y1
  
  i  
      
  X  

Overall, then, you specify just two values for a Memory box:

  • the initial value, init, which is to be used if the mem field is empty;
  • the next value, next, whose result gets put into the mem field, and becomes the value of the Memory box during the next calculation.

From the description above, it sounds as though the value specified in the init field will only ever be used once: on the first-ever calculation, as the mem field will never be empty again. However, you can re-initialize all the Memory boxes by pressing the IM button (Initialize Memories) on the left. This clears the contents of the mem field and main result field, then, if the init field of a Memory is not empty, its contents are transferred into the mem field, to become the value of the Memory box at the next calculation. This means that you may re-run a set of calculations from scratch, or run them with a different data set. The boxes below shows the result of pressing the IM button after the last calculation in the example just shown: 4 has replaced 6 in the mem field, and the Y1 result field is empty.

Number Operation
*1
*b
*A1
  
  i  
      
  X  
Memory Number
*init
*next
*mem
*Y1
  
  i  
      
  X  

Important: If the next field is left empty, no change is made to the mem field during a calculation. By entering a specification only in the init field, a Memory Number or Memory List effectively acts as a Common Number or Common List, but one in which the actual value is visible in the result field.

You may find the L0 (empty list) constant useful when using Memory Lists. If building up a list of results at each cycle, you may need to define the initial value of the list as L0.

One time you might use Memories is when you're calculating compound interest with variable interest rates. You might want to calculate the interest earned in the first year, add it to the initial sum to give you the total at the end of the year, and then use this as the initial sum for the next year.  You can also use Memories for carrying out many complex list operations, since you can deal with one item from a list at a time, and construct the resulting list from the results of each cycle. Note: for many complex list operations, you will not need to use Memories, since Numipulator already has many item-by-item operations built in.

Note: When inspecting details of calculations or relationships using Values or Flow, you will see two distinct reference names associated with each Memory box. For example, you will find Y1 and newY1, where newY1 refers to the value derived from the specification in next, which will become the value of Y1 in the next calculation cycle. Remember that these new... names cannot be used as an input to any other field, and that during a calculation cycle Y1 and newY1 are independent: Y1 is defined by mem, while newY1 is defined by next.

Formula - Under Row Z

The Formula numipulation box is intended to provide solutions to specific, commonly-encountered formulae, such as volumes and areas of common shapes, and solutions to complex number operations.

The input list for Formula consists of parameters. The selected Formula operation may take 1 or more parameters, and the input list may contain more than one set of these parameters.

The number of input parameters for the selected Formula operation is implied by the items, separated by semicolons (;) following the colon (:) in the operation description. These also indicate what the numbers represent. For example, the operation Growth: Initial; Rate%; Periods indicates that this takes 3 parameters: the first represents the initial amount or size; the second represents the growth rate, expressed as a percentage (for a given period); and the third represents the number of periods being considered.

Calculation generates results for each set of parameters, and these form the result list. In the Growth example, there will be one number output for each set of three parameters in the input list (representing the final amount or size after this number of periods).

Growth: Initial; Rate%; Periods

This takes sets of three parameters representing the initial amount or size, the percentage rate of growth over a given period (e.g. year) and the number of periods (e.g. years). The calculation yields one number representing the final amount or size after the given number of periods at the given growth rate.

Example: p1,p2... p1,p2... ...=1000, 4, 5: Result=1216.653

This is useful for calculating compound interest at a fixed rate for a given time.

Length between points: X1; Y1; X2; Y2

There are four parameters in the set: X1; Y1; X2; Y2, where X1; Y1 are the coordinates of one point, and X2; Y2 are the coordinates of the second point. The result is the distance between the two points, based on the formula √((X2-X1)2+(Y2-Y1)2).

Example: If X1; Y1; X2; Y2 = 0, 0, 3, 4 then the result is 5

Areas

Circle area: Radius

There is only one parameter in the set: Radius (r) of the circle. The result is the area of the circle, based on the formula πr2.

Sphere surface area: Radius

There is only one parameter in the set: Radius (r) of the sphere. The result is the surface area of the sphere, based on the formula 4πr2.

Cone surface area: Radius; Height

There are two parameters in the set: Radius (r) of the base of the cone; height of the cone (h). The result is the surface area of the cone (inc. base), based on the formula πr(r+√( r2+h2)).

Triangle area: S1; S2; S3

There are three parameters in the set: the lengths of the three sides of the triangle (S1, S2 and S3). The result is the area of the triangle based on the formula √(S(S-S1)(S-S2)(S-S3) where S is the semi-perimeter of the triangle: (S1+S2+S3)/2.

Triangle area: Base; Height

There are two parameters in the set: the base length (b) of the triangle and its perpendicular height (h). The result is the area of the triangle, based on the formula bh/2.

Volumes

Sphere volume: Radius

There is only one parameter in the set: Radius (r) of the sphere. The result is the volume of the sphere, based on the formula 4/3(πr3).

Cone volume: Radius; Height

There are two parameters in the set: Radius (r) of the base of the cone; height of the cone (h). The result is the volume of the cone, based on the formula πr2h/3.

Pyramid volume: Base Area; Height

There are two parameters in the set: Base area of the pyramid (A); height of the pyramid (h). The result is the volume of the pyramid, based on the formula Ah/3.

Complex Number Operations

These are operations on complex numbers, i.e. on numbers having a real part and an imaginary part. The four operations defined, addition, subtraction, multiplication and division, each take as inputs four parameters, which define two complex numbers, C1 and C2:

R1 is the real part of C1
I1 is the imaginary part of C1
(so C1 = R1+I1i, where i is the square root of 1)
R2 is the real part of C2
I2 is the imaginary part of C2

In all four operations, the result is a list whose two elements represent R3 and I3, the real and imaginary parts of the resulting complex number, C3.

Complex addition: R1; I1; R2; I2

If C1 = 3 + 4i and C2 = 5 - 3i then enter parameters:

3, 4, 5, -3

The result is 8, 1 since C3 = C1 + C2 = 8 + i

Complex subtraction: R1; I1; R2; I2

If C1 = 3 + 4i and C2 = 5 - 3i then enter parameters:

3, 4, 5, -3

The result is -2, 7 since C3 = C1 - C2 = -2 + 7i

Complex multiplication: R1; I1; R2; I2

If C1 = 2 + 3i and C2 = 4 + 5i then enter parameters:

2, 3, 4, 5

The result is -7, 22 since C3 = C1 X C2 = -7 + 22i

Note: the formulae used are:
R3 = R1 X R2 - I1 X I2 
I3 = R1 X I2 + R2 X I1

Complex division: R1; I1; R2; I2

If C1 = -7 + 22i and C2 = 4 + 5i then enter parameters:

-7, 22, 4, 5

The result is 2, 3 since C3 = C1 / C2 = 2 + 3i

Note: the formulae used are:
R3 = (R1 X R2 + I1 X I2)/(R22 + I22)
I3 = (I1 X R2 - R1 X I2)/(R22 + I22)

Conversions

The conversions here are for those to or from measurements that are not simple decimal numbers, namely feet and inches (12 inches = 1 foot), pounds and ounces (16 oz = 1 lb) and stones and pounds (14 lb = 1 stone). In all cases, these non-decimal measurements are entered or output as two numbers: a whole number of the larger unit, e.g. feet, and a decimal number of the smaller unit. The metric unit equivalent is entered or output as a simple decimal number. All decimal number outputs are rounded to 2 decimal places.

Just two are given below, one non-metric to metric, and one metric to non-metric. The others follow the same pattern.

Conv ft & in -> cm: ft; in

There are two parameters in the set: the number of feet (should be a whole number); and the number of inches (decimal).
Example:p1,p2... p1,p2... ...=5, 11.5: Result=181.61, i.e. 5'11.5"=181.61cm

Conv cm -> ft & in: cm

There is one parameter in the set: the number of centimetres (should be a whole number). The output consists of two numbers for each input parameter: the number of feet (whole number) and the number of surplus inches (rounded to 2 decimal places).
Example:p1,p2... p1,p2... ...=189.5: Result=6, 2.61, i.e. 189.5cm=6'2.61"

Body Mass Index

Body Mass Index, or BMI, is a commonly-used measure to assess whether someone is overweight, obese, and so on. The BMI is determined by the formula W/H2, where W is body mass (weight) in kg and H is height in metres. So, a person whose weight is 75 kg and whose height is 1.75m has a BMI of 24.49. In all the cases below, the BMI is rounded to 2 decimal places. The four operations below determine BMI for different commonly-encountered ways of measuring height and weight.

BMI (height & weight): cm; kg

There are two parameters in the set: Height in cm; Weight in kg.
Example: p1,p2... p1,p2... ...=175, 75: Result=24.49

BMI (height & weight): ft; in; kg

There are three parameters in the set: The first two together express the height in feet and inches (the first is the number of feet; the second the number of inches); the third is the weight in kg.
Example: p1,p2... p1,p2... ...=5:9, 75: Result=24.21    (i.e. the BMI for a person of height 5'9" and weight 75kg is 24.21)

BMI (height & weight): ft; in; lb

There are three parameters in the set: The first two together express the height in feet and inches (the first is the number of feet; the second the number of inches); the third is the weight in pounds.
Example: p1,p2... p1,p2... ...=5:9, 166: Result=24.51    (i.e. the BMI for a person of height 5'9" and weight 166lb is 24.51)

BMI (height & weight): ft; in; stone; lb

There are four parameters in the set: The first two together express the height in feet and inches (the first is the number of feet; the second the number of inches); the last two express the weight in stones and pounds (the third is the number of stones; the fourth the number of pounds).
Example: p1,p2... p1,p2... ...=5:9, 11:12: Result=24.51    (i.e. the BMI for a person of height 5'9" and weight 11stone 12lb is 24.51)

Equation Solver - Under Row Z

The Equation Solver numipulation box is intended to provide solutions to equations: quadratic equations and simultaneous linear equations.

The input list for Equation Solver consists of a single set of coefficients for the equation(s).

Quadratic equation ax^2+bx+c: a; b; c

Given a quadratic equation of the form ax2+bx+c=0, the two solutions for x are given by the formulae:
x=(-b+√(b2-4ac))/2a or x=(-b-√(b2-4ac))/2a

For a set of three coefficients, representing the values of a, b and c, this operation generates a pair of numbers representing the two values of x.

Example: coeffs=2, 4, -16: Result=2, -4

Note: an error is generated if the number of coefficients is not three.

Simultaneous Eq'ns n: nX(n+1) coeffs

This operation is concerned with solving simultaneous linear equations, where there are unique solutions of the variables that satisfy the equations.

For example, given the two simultaneous linear equations:

5x - 2y = 4
 x + 2y = 8

the unique solutions for x and y that satisfy both equations are x = 2 and y = 3

The simultaneous equation operation in Numipulator is intended for solving n equations that contain n variables. The result is a list of the unique solutions for the n variables.

Each value in the input list coeffs represents a coefficient or constant in a set of linear equations of the form:

c11x1+c12x2+....c1nxn = k1
c21x1+c22x2+....c2nxn = k2
.....
cn1x1+cn2x2+....cnnxn = kn

where the coefficients c11, c12,.....cnn, kn are entered as a list (row-by-row starting from the top). 

Important: The constants of the n simultaneous equations (k1... kn) are always assumed to be on the right-hand side of the equations, following normal convention. This is different from quadratic equations where the constant (c) is, by convention, assumed to be on the left-hand side.

The number of simultaneous equations to be solved is not input explicitly. This is determined from the number of values in coeffs, since, if there are n equations, the number of coefficients is nX(n+1). So, for 2 equations there are 2X3=6 coefficients, for 3 equations there are 3X4=12 coefficients, for 4 equations there are 4X5=20 coefficients, and so on. If the number of values in coeffs does not correspond to an integer value for n, an error will be produced.

So, to solve two simultaneous equations such as:

5x - 2y = 4
 x + 2y = 8

the coefficients are input (in coeffs) as:

5, -2, 4
1, 2, 8

The result is a list containing the values of x and y that satisfy both these equations, namely:

2, 3

To solve the three equations:

x y + 2z = 1    
2x          -  z  = 2    
x + y + z  = 3    

enter 12 coefficients (note the 0 representing the coefficient of y in the second equation):

1, -1, 2, 1
2, 0, -1, 2
1, 1, 1, 3

The result is a list comprising the values of x, y and z that satisfy all three equations, namely:

1.25, 1.25, 0.5

Repetitions

Whenever you press the = (Calculate) button, one set of calculations is carried out and the results are displayed. The Go buttons for Repeat until (the one in the Repetitions box or the one down the left) allow you to perform a sequence of calculations before the results are displayed. This sequence, these repetitions, are intended principally for use with Memory Numbers and Memory Lists , since these enable you to carry results from one set of calculations as inputs to the next set of calculations. Only when the repetitions have completed are the results displayed.

Note: the value shown in the Cycle field is incremented each time (it has the value 1 for the first cycle).

The Repeat until functionality allows you to specify that calculations should be repeated until some condition is met. 

The condition is specified as a comparison between two numbers, where the comparison is selected from a drop-down list as one of < , <= , = , <> , >= or >, unless both input fields are left blank, in which case the condition is deemed to be satisfied, by default, after one evaluation cycle. Either of the two numbers may be specified directly as a number or by a reference name (just like any other input field). When the Go button to the right of the Repeat until field is pressed, one set of calculations is carried out (unless exactly one of the input fields is undefined, in which case no calculation is carried out). If both input fields are blank, no further calculations are carried out and the repetition stops after one cycle (by default), otherwise the values of the two Repeat until fields are evaluated as part of this, and a check is made to see whether the condition is satisfied by these values.  If it is, no further calculations are carried out and the results are displayed; if it is not satisfied, a further set of calculations is carried out. This continues until the condition is satisfied.

If the value of either Repeat until input field is not a number, a suitable alert is given and no further repetitions are carried out.

Control1

The Control1 field lets you specify that a delay should occur between one cycle and the next. The value defines a delay time in seconds. The value may be either specified as a number or as a reference to another numipulation box. Specifying a reference name enables you to change the delay time each cycle, if you wish. The specified delay occurs after the value has been calculated in that cycle. This is particularly useful for graphical applications. It can allow an appropriate time for a player to respond in the Graphics Formatter or Animation Zone. If the specified value is 0, or no value is specified, then no delay occurs; this has an important impact on the Graphics Formatter, as no delay means that no graphical inputs can be accepted from one cycle to the next. For games, allowing the user to vary the delay time can be a good way to speed up or slow down the game.

Cycle

The number of cycles carried out when the repetitions stop is shown in the Cycle field. This field also shows how many cycles have been carried out while repetitions are underway. Note: it also displays 1 after the '=' (Calculation) button is pressed.

Stop Repetitions

In case you set up a repetition cycle that goes into a loop, e.g. because the Repeat until condition cannot be met, you may press the red Stop button on the left. This stops calculation at the end of a cycle, and the results so far are displayed. The button can, of course, be pressed whenever you wish to stop a set of repetitions, and can be restarted by pressing a Go button.

Warning

Beware of setting a Repeat until condition that is based on the equality of two numbers that are not integers. The internal inaccuracies of Numipulator mean that even though you might expect equality, this may not be achieved. Even if the results output look as though the two numbers are the same, they may not be. See Accuracy and output number rounding for more on this.

Impact of errors

If an error, e.g. 'Wrong Type', is passed as an input to either the Graphics Formatter or the Animation Zone, repetitions are stopped automatically.

Repetitions and Value Changes

Before a set of repetitions begins, and, indeed, before any calculation begins, Numipulator determines the inital values and relationships, as given by the text in the numipulation boxes, Mappings, etc. For the second and subsequent cycles, the values and relationships already defined are employed, so any changes to the numipulation box text (and this is possible under certain circumstances) will have no effect.

The only values that are independent of others (apart from functions generating random numbers or permutations) that can change from one cycle to another are:

  • now (the new time is checked at the beginning of each cycle)
  • Graphin1 and Graphin2, if graphical input between cycles is specifed
  • click (is set to 1 if a graphical input has been accepted, otherwise it is set to 0)
  • keypad (is set to one of the values 1-9 if a keypad click has been made since the start of the previous cycle, otherwise it is set to 0)
  • any Memory value, if a next value has been defined.

You might expect that if a certain number of calculation cycles were carried out using one of the Go buttons, then the results would be exactly the same as if the = button were pressed the same number of times. However, there may be some differences. This may be for one or more of the following reasons:

  • the value of now will be different;
  • the value of any random number or permutation generated will probably be different.

Mappings and Output Formatting

The Mappings box allows you to define text and symbols to represent numbers. The words and symbols may then be used in any list or number input field to represent that number. This allows you to enter data in terms that are more meaningful to you. For example, if you are entering data about certain countries, e.g. UK, USA, Germany and France, and are using the numbers 1, 2, 3 and 4 to represent these in your data, you can instead map these words to the numbers 1, 2, 3 and 4 in the Mappings box and enter lists or numbers that include these words. The word Germany will be treated as the number 3.

Mappings are entered in the Mappings box in the form of a list, where the groups of characters and numbers are separated by the same separators as numbers in a list input field. The list is treated as a sequence of Mapping Number pairs (any surplus word or number is ignored). So, to map UK, USA, Germany and France to 1, 2, 3 and 4, the list entered would be:

UK 1
USA 2
Germany 3
France 4

or even as

UK : 1, USA : 2;
Germany : 3          France, 4

Given these mappings, we could then have the two inputs to an addition being France and Germany. The answer would be 7.

Any sequence of characters may form the Mapping except the following:

  • any predefined constant or time, such as pi , e or now ,
  • the word Mappings itself (this has special significance - see below)
  • those beginning with a numeral, a '+' followed by a numeral or a '-' followed by a numeral. The following are all invalid: 6A -6A +6A, as are 121.5 or 45 (you can't redefine numbers!)
  • any sequences that begin with one of the following: A , B , ... Z , List , Num , Form , Equation , Graphin , Control , newY , newZ followed by a sequence of numerals only. This ensures no conflict with Reference names or system names. So, the following are all invalid: C1, C67, List5. However, C, C1Credit, C1_Credit or C1-Credit, are valid as they do not end with a sequence of numerals only.

Note: symbols may also be included. Several built-in Numiplets include mappings to symbols: < <= = <> > >= to improve the interface.

Beneath the Mappings text box are three buttons that can be used to add commonly-used mappings:

  • A-Z - adds mappings for the capital letters A-Z to the numbers -1 to -26. These are grouped under Mappings Letters.
  • +-x/ - adds mappings for the codes (1-28) for Number Operators (as given when pressing the Codes button). Next is included for 0 when separating expressions in Calculator list and Expression list functions. This includes the mappings for the codes (14-19) for Comparison Operators (as given when pressing the Codes button). These are grouped under Mappings MathLogic.
  • COL - adds mappings for the simple colour codes -20 to 20. bg means black background and maps to 0. The names beginning with capital letters represent cells with borders, while those beginning with lower case letters represent borderless cells. The names are generally the same as those given when pressing the Codes button, but those consisting of two words have been shortened to one. These are grouped under Mappings Cols.

A sequence of pairs may be preceded by the special word Mappings followed by a GroupName . Any mappings following, up till the next Mappings GroupName heading, form part of this mappings group. Although the mappings specified are used for inputs, the GroupNames are used for output formatting only (see below).

So, the Mappings box list might contain two mappings groups - one for countries, one for regions, as defined by the following list, which will be used in some examples below:

Mappings Countries
UK 1
USA 2
Germany 3
France 4
Mappings Regions
Europe 1
Africa 2
Americas 3
Asia 4
Australasia 5

Note: if the same name is mapped to 2 or more different numbers in the Mappings box, only the first such mapping is used for input mapping.

Output Formatting

The Table Formatter, Graphics Formatter and Feedback features of the Graphics Formatter and Animation Zone all provide facilities for mapping an output: taking a number and mapping it, or formatting it, to some sequence of characters. These can make outputs more meaningful.

In all cases, the formatting of a number is defined by a string of characters - an Output Formatting String.

In all cases, if no specific formatting is successfully applied, the default Output Number Rounding is applied.

a) Output Formatting String = Mappings

If the string consists of just the word Mappings , the first Mapping Number pair, where the Number = the number to be formatted, is found from the Mappings box. The Mapping is output instead of the number.

So, if the list of numbers to be formatted is: 1, 2, 3, 4, 5, 6
the output, given the Mappings definitions above, is: UK, USA, Germany, France, Australasia, 6

b) Output Formatting String = Mappings GroupName

If the string consists of the word Mappings followed by a GroupName (separated by a single space), the first Mapping Number pair, where the Number = the number to be formatted, is found from the specified Mapping Group.

So, if the Output Formatting String = Mappings Regions , then, if the list of numbers to be formatted is: 1, 2, 3, 4, 5, 6,
the output, given the Mappings above, is: Europe, Africa, Americas, Asia, Australasia, 6

In contrast, if the Output Formatting String = Mappings Countries , then, if the list of numbers to be formatted is: 1, 2, 3, 4, 5, 6,
the output, given the Mappings above, is: UK, USA, France, Germany, 5, 6

c) Output Formatting String contains internal mappings

If the string contains a colon or a space, and is not one of the other formats defined here, the mapping is defined within the Output Formatting String itself. The string consists of one or more lines, each one of the form
Test:Text
or
Test Text

These lines are checked, in order, until a line is found where the number to be formatted satisfies the Test defined. If so, the output mapping is all the Text on that line following the first colon or space (unless this is a date format - see below).

The Test components are simple comparisons: a comparison operator (<, <=, =, <>, >=, >) followed by a number (no spaces). A simple number may also be the Test, equivalent to = followed by the number. Alternatively, the Test may be just the single letter n , which always succeeds for any number. Note: the Text may include spaces; it may also be empty.

So, if the Output Formatting String is

0 Zero
<=1:Very small
<5:Small
<10 Average
n Large

the list of numbers 1, 4, 6.5, 12, 0, -1 maps to:

Very small, Small, Average, Large, Zero, Very small

In contrast, if the Output Formatting String is

<10 Average
<=1 Very small
0 Zero
<5 Small

the same list maps to:

Average, Average, Average, 12, Average, Average

since any number < 10 immediately satisfies the first Test, so the later Tests are ignored. No Test succeeds for 12, so it is output with standard rounding.

If the Text specified is a special date format, such as DDMMYYYY, as described in e) below, the number will be output in the appropriate date format, as described in e). So, if the Output Formatting String is

>10000000 DDMMYYYY:

any number greater than 10000000 will be formatted as a date, with colons as separators, e.g. the number 20070331 will be output as 31:03:2007. Any other numbers will be output with standard rounding only applied.

Note: the difference between this and e) below is that with e) the date formatting is applied to all numbers. With a Test, it can be more selective.

d) Output Formatting String is a non-negative integer

If the string is a simple positive integer, or 0, the number is rounded to this number of decimal places.

e) Output Formatting String is a date format

There are a number of date formats, intended for formatting a non-negative integer in the Numipulator YYYYMMDD data format, such as 20070331, which represents the date 31 March 2007.

The data formats are listed below, together with the output for the number 20070331:

DDMMYYYY - 31/03/2007
MMDDYYYY - 03/31/2007
YYYYMMDD - 2007/03/31
MMDD - 03/31
DDMM - 31/03
MMYYYY - 03/2007
YYYYMM - 2007/03

The date format may also be followed by a single character, which will be used as a separator instead of '/'. So, for example

DDMMYYYY: gives the output 31:03:2007

Date formats may also be used for times or other numbers. If the number is less than 10000, the YYYY part is taken as 0. Note: the DD and MM parts of the output always have two numerals (with initial zeros inserted if necessary), but the YYYY part has the minimum number of numerals possible. So, the input number 130512 would, for the format YYYYMMDD:, be output as 13:05:12.

Table Formatter

The Table Formatter lets you format a list of numbers into a table. This table is purely an output for display - it has no reference name so cannot be used as an input to any numipulation box. You can, of course, copy and paste the table into other applications, e.g. spreadsheets or word processors. Like the output of most numipulation boxes, it is displayed only at the end of any repetitions.

Essentially, it takes a list of numbers and displays it as a table, i.e. as a set of rows and columns. You may also specify lists of numbers to be displayed as column labels, row labels, or both. Additionally, there are three fields concerned with output mapping.

In this formatted table, each row is displayed on a new line. The items on each row are, by default, separated by the selected output list separator, unless this is a paragraph, in which case a tab is used as the separator. So, since a space is the default list separator, the default separator of items in a table row is also a space, so this makes the resulting table unsuitable for copying and pasting into a spreadsheet, as the items should be separated by tabs. To make it suitable for spreadsheets, ensure that the output list separator is a tab or a paragraph.

There are four main inputs to the Table Formatter (all of which may be treated like inputs to numipulation boxes, i.e. you may use numbers, reference names, or, for lists, a mixture, to specify their values): la , ncols, Row labels and Column labels

The first input, la, defines the list of values to be shown in the table.

The second input, ncols, specifies the number of columns there should be in the output table. The values on la are always laid out horizontally (i.e. from left to right starting at the top left) in a table with ncols columns.

Example: For la=1, 2, 3, 4, 5, 6 and ncols=2, the table produced is:

1 2
3 4
5 6

The last two list inputs to the Table Formatter are:

  • Row labels . This is a list whose values form the labels of the output table rows (top-to-bottom). Specifying this is optional, but if it is specified, the number of values must equal the number of rows in the output table.
  • Column labels . This is a list whose values form the labels of the output table columns (left-to-right). Specifying this is optional, but if it is specified, the number of values must equal the number of columns in the output table.

Note: if both row labels and column labels are specified, the top-left 'cell' of the table displayed is represented by a single space character.

As an example of how you might use row and column labels, suppose you took two lists 3, 4, 5 and 10, 20, 30 40, and used the cross-pair operations to produce a list of containing the product of each cross-pair, i.e. 30, 60, 90, 120, 40, 80, 120, 160, 50, 100, 150, 200.  With this list as la and a value of 3 for ncols , with the row labels defined as 3, 4, 5 and the column labels as 10, 20, 30 40, the following overall table is displayed:

Note: If la is an empty list, L0 only is displayed in the table output field, as long as ncols is defined as a positive integer, regardless of whether row or column labels are defined, or of what their values/lengths are.

Note: There are also two output fields, Number rows and Number columns . These display the number of rows and columns in the main output table (excluding labels).

Output formatting

The Table Formatter also provides you with the ability to include text in the table.

There are three fields concerned with this:

Column label text

This takes, as input, an Output Formatting String , as discussed in Output Formatting.

Each number in the Column label is formatted according to this string. This allows you to output text as column headings, instead of numbers, to make the table more meaningful.

So, given a table with three columns, and a column label list = 1, 2, 3, the following definition of Column label text

=1:Base cost
=2:Tax
=3:Total cost

would give the following column headings:

Base cost    Tax    Total cost

Row label text

Like Column label text, this takes, as input, an Output Formatting String. Each row label number is formatted according to this string.

Main table text

This field also takes an Output Formatting String. Each number on the main table is formatted according to this. So, for example, if the specification were
=0:
then every value 0 on the main table would be replaced by a space.

Open button

The Open button, at the top right of the Table Formatter, displays the values, without the formatting defined in the Table Formatter, in a table/grid in the Information Zone. The form of this is suitable for copying and pasting into a spreadsheet.

Graphics Formatter

The Graphics Formatter is a powerful tool that lets you:

  • display a table of results in a grid;
  • associate colour, borders, shapes or images with the values displayed;
  • specify that certain values should not be displayed;
  • map text to the output values, both in the grid and in a feedback field;
  • provide graphical input, by mouse-clicking/tapping on the grid cells, including between repetition cycles;
  • display graphical output between repetition cycles.

Overall, these features provide you with a means of:

  • visualizing your data;
  • watching the progress of a set of repetitions graphically;
  • developing your own graphical tools and apps (Numiplets), including ones that are dynamic and display graphical changes at each cycle and allow mouse-click/tap inputs;
  • having fun - seeing how calculations and manipulations of numbers can be used to produce puzzles and games - even those based around words and letters.

Yes, numbers can be fun, and Numipulator with its Graphics Formatter proves it.

The Graphics Formatter Grid

The visible Graphics Formatter grid is, by default, a 10X10 grid. The values of any table may be displayed in the cells of this grid. The table to be displayed is specified in the Table parameters boxes to its left: the field la specifies the list of values that form the table, while ncols specifies the number of columns in the table. The values are always laid out horizontally (left-to-right) starting at the top row, row 1. If the length of la and the value of ncols do not specify a valid table, an error message is given in the Feedback field, and any repetitions are halted.

The grid may be extended by specifying different numbers of rows or columns through tapping on the small table at the bottom left of the Graphics Formatter area. The number of each may be set from 10 to 25 (in steps of 5). The current setting for each has a green background.

A table that extends beyond the grid size can also be specified for display, but only the grid-size portion of it will be displayed. Other parts of the table can be viewed by using the +1 or +5 buttons or -1 or -5 buttons to move the focus of the display. The =1 button moves the display back to the first cell of the row or column.

Note: The row and column numbers being displayed are shown in the beige stripes at the left and top respectively.

Note: If the value of ncols is inappropriate for the number of values on la, the table will be treated as having one column only.

Adding colour, borders, shapes and images

By default, the values of the table are displayed in white text fields on a white background (the black background showing at the beginning changes when a table is specified for display). All the other cells are shown completely blank.

However, there is another field, below ncols, called Cell formats . A list of values, which must be identical in length to that of la, may be specified in this. These values specify the background colours, borders, shapes or images to be displayed for the corresponding value on la. If the lengths of la and Cell formats are not identical, an error message is given in the Feedback field, and any repetitions are halted.

For simplicity, Numipulator employs codes that map to 20 colours as backgrounds to the square tiles, with or without borders. The values on this simplified list should be integers in the range -20 to 20. Essentially, these are mapped to 20 colours and to border/no border, as follows:

1=white; border
2=black; border
3=red; border
...
and so on up till
20=beige; border

The numbers -1 to -20 have the same colours, but have no border. In addition, 0 has a black background and no border, and, importantly, does not display the value in a text box. This is useful for creating a plain, black background, regardless of the associated values.

The full set of format codes can be seen by clicking the Codes button near the top of the main Numipulator page. This also describes the use of other format codes, which give you millions of available colours, and codes that specify a large set of shapes and images, including emojis, with, a wide range of colours for both the shape and the background, and for larger text on the tiles (intended for 1 character only), again with the same text and background colours. There are also codes that let you display graphics from external web sites in the cells, employing URLs defined in the URLs field.

So, given la=1,2,3,4,5,6 and ncols=3 and Cell formats=3,3,3,-2,-2,-2, a table with 2 rows and 3 columns would be displayed, with the cells of the top row having a red background and a border, and the cells of the second row having a black background and no border.

Mapping text or NOTEXT to the values displayed

As with the Table Formatter, text can be mapped to numbers and displayed on the grid instead of the numbers. The mapping is specifed in the Cell text field, which takes a simple Output Formatting String . So, if la=-1 -2 31 2 27 4;
ncols=2; and
Cell text=
=-1:Cost
=-2:Number
Cell formats=-8 -8 -3 -3 -3 -3

then a table showing:

Cost Number
31 2
27 4

would be displayed, where the top row has a yellow background and the other rows have a red background (all no borders).

Sometimes, you will choose not to display any text; in fact, you may wish to have no text field displayed in the middle of the grid cell. If you map any number to the special text value NOTEXT, the text field will not be displayed. This allows you to produce graphical output that has absolutely no text displayed, just colours.

The built-in Numiplets provide you with many examples of text-mapping, the use of NOTEXT and the use of shapes and larger, coloured text. However, to try it out, enter the parameters 100, 20 in numipulation box G1 and select the operation p1 random ints 1->p2 . Then specify G1 as the list value for both la and Cell formats, ncols=10 and Cell text= n:NOTEXT. The last means that every number should be mapped to NOTEXT. When you press an '=' button, you should see the 20 colours randomly placed on the grid.

Remember that the Output Formatting String can be just the word Mappings, in which case the Mappings declarations are used in reverse, so that a Mappings declaration A 1 B 2 is treated as Cell text:
=1:A
=2:B

By the same reasoning, if the Mappings declaration is A 1 B 2 0 NOTEXT, this will be treated as if the Cell text is:
=1:A
=2:B
=0:NOTEXT
so that 0 will be mapped to NOTEXT, which means that the text field will not be displayed.

Feedback Text

Above the grid is a text field intended for providing feedback, additional information, and so on. The values to be displayed in this are specified in the Feedback values field on the right, while the text mappings for these values are specified in the Feedback text box, again as a simple Output Formatting String .

So, if the Feedback values were specified as P1, and the feedback text as:
=-1:You have
=-2:turns remaining. Good luck!
then, if P1 had the value -1 4 -2, the feedback provided to you in the Feedback field would be:

You have 4 turns remaining. Good luck!

Note: If you are dealing with exclusively non-negative numbers as 'real' values, you may find it useful to employ negative numbers for mapping letters and words to, as in the above Feedback.

Note: Feedback works only if the Graphical Formatter is in use (i.e. la and ncols are correctly defined).

Graphics with repetitions

On the left of the page are three small buttons below the green = button: Start, Go (both green) and Stop (red). These are all concerned with repetitions. Start and Go both initiate a set of Repeat Until cycles. So, if you wish to make use of these buttons, you need to define the Repeat Until values, or else leave them both blank so that exactly one cycle is carried out (by default).

By default, the output will be displayed graphically after every cycle. However, you can also choose to prevent the display of graphics at the end of any cycle (apart from at the end of the last cycle, when graphics will always be displayed). To do so, specify a value in the field Control2 on the right of 0. This will prevent the display of graphics at the end of a cycle that is not the last cycle.

Note: By making a reference to some other numipulation box in Control2, which may have the value 0 in some cycles and non-zero in others, you can control when to display the graphics.

Note: If Control2 is not defined, graphics are displayed between cycles.

Graphical inputs and clicks

By default, you should see a green bar near the top of the Graphics Control box. This indicates that the system will accept your mouse-click. However, if you uncheck the box to Allow graphical input just above the green bar, the bar will change from green to red to indicate that clicking on the grid cells will have no effect.

When you click on one of the grid cells (and the band beneath the check box is green):

  • The Graphin1 field on the right is changed to the Row number of the selected cell;
  • The Graphin2 field on the right is changed to the Column number of the selected cell;
  • The value of the system value click is set to 1;
  • Assuming a set of repetitions is not already underway, a new set is begun, using the values of Graphin1 and Graphin2 specified by the mouse-click.
  • No further graphical input is allowed (the green band turns red) - unless expressly specified as below.
Note: Graphin1 and Graphin2, which are Common Numbers whose values cannot be typed in, can be specified as input values to any other numipulation box.

By default, no further graphical inputs (through mouse-clicking on the cells) are allowed until the current set of cycles ends, at which point the red band turns green again. However, you may specify a value in the field Control1 in the Repetitions box. If the value of this, as calculated in a cycle, is greater than 0, the system will, at the end of that cycle, turn the band green, and wait for a period of approximately Control1 seconds, and accept any mouse-click made during that time (as shown by the band's being green). The last such click made during that time will be acknowledged by Numipulator (click will be set to 1 and the new values of Graphin1 and Graphin2 will be used in the next cycle). So, if Control1 has the value 1.5, the system will wait approx. 1.5 seconds to allow graphical input.

Because you cannot type in values to Graphin1 and Graphin2, there will be no value specified in any first cycle. If you are using Graphin1 or Graphin2 in your program, this would cause failure. To overcome this, you can specify initial values for Graphin1 and Graphin2 in the init fields just above them; these values will be transferred into Graphin1 and Graphin2 if they are found to be empty.

Note: The values of Graphin1 and Graphin2 remain unchanged in a set of cycles unless changed by a mouse-click. The system value click is important, as this is automatically set to 0 at each new cycle unless a click has been acknowledged, when it is set to 1. Your set-ups can therefore make a distinction between old and new values of Graphin1 and Graphin2.

Note: If Control1 is not defined, graphical input is not accepted during repetitions, as there is no time delay to allow them.

Start and Go buttons

Both the Start and the Go button initiate a set of Repeat Until cycles. They are however different. The Start button first initializes all the Memory numbers and lists. It also inspects the init values above Graphin1 and Graphin2, and, if any of these are defined, it copies the text into the main Graphin1 and Graphin2 fields. This ensures that if you use the Start button to begin, you can set the values of Graphin1 and Graphin2 appropriately. If you make use of Graphin 1 or Graphin2 in any other Numipulation box, you must set these init values, otherwise Graphin1/Graphin2 will have no values, so an error occurs. In contrast, the Go button does not carry out these initializations. This is a useful button if you have pressed the Stop button to inspect the state of your calculation and then wish to carry on calculating without re-initializing.

Open button

The Open button opens up the Information Zone and displays the complete table currently being displayed in the Graphics Formatter (not just the grid area). As it is at smaller scale, the text fields and values are not displayed - only the colours. Emojis and shapes are displayed, but all larger, coloured text is shown as a ? of the correct colour, and URL images are displayed as X. The values underlying the displays may be seen on a laptop by hovering over the cell in the grid: the value and the row and column numbers are then displayed.

URLs field

To the left of the Graphics Formatter is a URLs field. Here, you can specify URLs of graphics to be displayed in the grid cells (see the Codes link for more on this: N=20). Each URL must be direct to a .jpg, .jpeg, .gif or .png file. If the URL does not end with one of these, it will not work. There should be one URL per line.

Animation Zone

The Animation Zone provides another means of producing graphical output, but it provides no means of interacting directly with the images produced by clicking on them. Instead, it provides an Animation Keypad, intended for controlling objects displayed on the screen. It is intended for developing animations such as those used in games, while the Keypad enables games of the shoot 'em up variety to be developed.

There is only one main input to the Animation Zone, called Cell formats. The value of this should contain one number, a format code, corresponding to each cell of the grid of cells to be displayed, which is always a square of maximum size 150x150 cells. This means that the length of the evaluated list (i.e. the number of items on it) must be the exact square of a number lying between 1 and 150, e.g. 100 for a size of 10x10, 1600 for a size of 40x40 or 22500 for a size of 150x150. If the length of Cell formats is invalid, an error message is given in the Feedback field, and any repetitions are halted.

The numbers on the list are all used only to determine the colour and border of its associated cell. The only colour codes used are the numbers 0, 1-20, the short RGB codes 1000-1999 and the full RGB codes >= 1 billion, as described for the Graphics Formatter, and also their negatives; any other code will display as white. As with the Graphics Formatter, positive codes are displayed with a border, while negative codes are displayed without a border. So, the codes 3, 1900, 1255000000, -3, -1900 and -1255000000 all yield a red-coloured cell - the first three with a border, the last three with no border. Hint: If you don't like working with negative numbers to give borderless cells, use positive numbers but then multiply the resulting codes by -1; this approach is taken with the built-in Alien Invasion game. The length of the list will have an impact on the speed of response, as 22500 cells will take more computing power and time to deal with than 100 cells, so beware of using too large a grid size, as this may slow your app down too much.

Unlike with the Graphics Formatter, the size of the individual cells tends to reduce as the size of the grid gets bigger, so that the overall size of the grid remains <= 500 pixels. Note: using borders can significantly slow down the generation of the graphics, so we would recommend using no borders if speed is important. We would also recommend not using borders with a grid size > 80x80 (6400 cells), as the colour of each cell becomes submerged by the borders.

The Animation Zone also has Feedback values and Feedback text inputs that work precisely like those for the Graphics Formatter.

Note: If you wish to have a visible grid with a size that is not a square, use a grid size that is larger than the size you want and define a background with a colour code of -1142035035, which will exactly match the brownish background of the Animation Zone, so that you see only the grid that you wish to have. The same also applies to the Graphics Formatter.

The Animation Zone also has Feedback values and Feedback text inputs that work precisely like those for the Graphics Formatter.

The Animation Keypad is a 3x3 grid. The middle cell is red, and is intended for requesting 'shoot' or 'fire'. The outside cells all have arrows on them, generally specifying a request to move an object in a particular direction, although the developer of games in this may choose to make them have different meanings. So, the game developer may choose to make the arrows pointing NE and NW (assuming N points up) to mean 'rotate clockwise' and 'rotate anticlockwise', for example. The developer may also change the symbols shown on the keypad to reflect the intended meanings, e.g. use rotation symbols. Any changed symbols are defined in the Keypad symbols field below the Keypad. Pairs of numbers are given (formatted as a standard list): the first is the key on the Keypad whose symbol is to be redefined (1-9, see below), while the second is the Unicode number for the symbol, e.g. 8630 for an anticlockwise rotation. Use code 32 (space symbol) for any key not intended to be used. So, if the Keypad symbols field has the folllowing content

1 8404
3 8405
7 32
9 32

the top-left symbol will be an anticlockwise symbol, the top-right symbol will be a clockwise symbol, while the two bottom corner symbols will be blank. Note: these changes occur only when the numiplet is loaded.

When the Keypad is clicked or tapped, an internal value is set. The values set by the keys are as follows:

123
456
789

At the beginning of a cycle, the last setting made, since the beginning of any previous cycle, by using the keypad becomes the value of the internal value keypad. If no keypad click has taken place in that time, the value of keypad is set to 0. So, if you wish to specify what the output should be when a user clicks on the fire button, e.g. in an If-Then-Else box, you should specify what the output is to be when keypad = 5. You may, of course, choose to disregard certain keypad clicks.

There are a few built-in numiplets that make use of the Animation Zone. One, Moving truck animation, merely shows a truck moving across the grid, and no means of interaction using the keypad is provided. Another, Alien Invasion, is a version of a well-known 1970s game, in which you need to shoot down aliens to get points, while they are moving, descending and bombing you. This uses the keypad to fire missiles and to move the missile launcher. Some of the outer buttons have had their symbols changed from the defaults, so that the ones on the right move the missile launcher rightwards by 1, 2 or 3 cells, and the ones on the left move it leftwards by the same amounts. The built-in numiplet Keypad control to move object provides generic code for controlling the movement of an object in the Animation Zone with the keypad.

Key points about the Animation Zone to be understood are:

  • The graphics are updated after every cycle; there is no option to prevent updating after a cycle as there is with the Graphics Formatter.
  • The delay time specified in the Control1 field in the Repetitions box applies to the Animation Zone (as well as the Graphics Formatter). This can be used to control the speed of games in the Animation Zone.
  • Keypad presses are accepted at all times once evaluation has started, including during an evaluation cycle, not just in the delay period afterwards.
  • The Start, Go and Stop buttons, the Auto Start and Auto Go settings, and the Repeat until specifications operate exactly the same with the Animation Zone as with the Graphics Formatter.

Accuracy and Output Number Rounding

As with all calculators and spreadsheets, Numipulator has accuracy limitations. Numipulator depends on the accuracy of the underlying browser's Javascript interpreter for its internal accuracy.

These accuracy limitations can cause some surprises. For example, with one browser, the simple subtraction 3.6-1 yields a result of 2.6, as you would expect; however, the subtraction 4.6-1 yields a result of 3.5999999999999996. For those undertaking simple calculations, presenting this as a result would probably be unacceptable.

For this reason, Numipulator, by default, rounds all outputs to 12 decimal places. With this rounding, 4.6-1 yields a result of 3.6.

You may change the rounding of all numbers output by selecting the number of decimal places to which rounding should be carried out (0 - 12) from the drop-down list under Output Number Rounding in the Settings section towards the bottom of the Numipulator page. You may also select Internal, which means that Numipulator applies no additional rounding of the answers produced by Javascript.

Output rounding to a lower number of decimal places can come in useful.  For example, if you're calculating the total price, including tax, of goods based on their base price, you will generally want to see answers displayed to two decimal places only.

Important: when a reference name is used in some calculation, the value used is the underlying value, not the value you see displayed after the set of calculations. So, if you have A1=2.8/5 and A2=A1+0.58 and you round outputs to 1 decimal place, the results will be shown as 0.6 and 1.1. You might have thought that A2=0.6+0.58 would be 1.18, which, when rounded to 1 decimal place, would be 1.2. But, the underlying value of A1 is 0.56, so the true value of A2 is 1.14, which rounds down to 1.1. 

If you want to ensure that rounded values are used as inputs, you will need explicitly to round values before they are used. So, if A1=2.8/5; B1=A1 with the Round to 1 dec. pl. function applied; and A2=B1+0.48, then the underlying value of A2 will be 0.6+0.48=1.08. With outputs rounded to 1 decimal place, the value of A2 will be displayed as 1.1.

The accuracy limitations mean that you will also find problems or errors with very large numbers (e.g. integers > 1014). So, for example, the addition operation 12345678901234567 + 0 might yield the result 12345678901234568. The same is true for very small numbers, and any numbers with a large number of numerals.

Note: The values put into the mem fields of Memory boxes are not rounded, but are the internal values. This helps to ensure that a series of calculations carried out by pressing the = button gives the same final outputs as a set of repetitions (where internal values are always used).

Errors

Errors may occur when you're using Numipulator, and these will be handled in different ways. In all the cases below, these errors are identified and displayed to you once an = button is clicked, or when a Go... or Start button is clicked. In addition, if an attempt is made to load a Numipulator set-up that is empty or has a syntax error, an alert box to this effect is displayed.

Note: if an alert box is displayed when an error is identified, you must acknowledge the alert by pressing the OK button, or similar, depending on your browser.
Note: the errors below are checked for in order. If one type of error is identified, you will not be alerted about the later types, even if they exist.

Incomplete inputs and other syntax errors

If a numipulation box or other feature with inputs (e.g. Repeat until, or Graphics Formatter) has text in one of its input fields but not in some other one that is required for the calculation to occur, no calculation takes place and an alert box is presented, which notes that a Syntax error has occurred in a particular field which is <empty>.

If the text in a number input field is not a single number or a valid reference name, no calculation takes place and an alert box is presented, which notes that a Syntax error has occurred in a particular field; the text input is also displayed.

If the text in a list field is analysed and contains an item that is not a number or a valid reference name, no calculation takes place and an alert box is presented, which notes that a Syntax error has occurred in a particular field; the item text is also displayed.

Note: if more than one syntax error is found, all are displayed in the alert box.

Undefined inputs

If the reference name of a numipulation box is used as an input, but the inputs for the numipulation are blank (so the value cannot be determined), no calculation takes place and an alert box is presented, which notes that a value is being specified but is undefined. Note: if more than one error of this type is identified, all are displayed in the alert box.

Circularity

If the linkage between numipulation boxes is defined in such a way that there is circularity, e.g. A1 depends on A1; or A1 depends on B1 which in turn depends on A1; or A1 depends on B1, B1 depends on C1 and C1 depends on A1, and so on, no calculation takes place and an alert box is presented. This notes that circularity has been found, and also states which numipulation boxes cannot be evaluated because of this circularity.

Errors during calculation

Even when calculation is underway, certain errors may be found. These do not result in alert boxes. Instead, the error message is shown as the result of the calculation (i.e. in the result field). Some of these error messages are produced by the underlying Javascript; others are identified and generated by Numipulator.

NaN - indicates that the result is Not a Number. Typically, this results if an attempt is made to produce a numerical value that cannot be determined, e.g. square root of a negative number.

undefined - indicates that the result cannot be determined.  This is the result of an attempting to carry out some operation that is invalid, e.g. find the first item of an empty list; or find the First quartile of two numbers; or calculate the index of some item in a table from its row and column numbers, where these are not input as positive integers.

Wrong type - indicates that a value passed as an input to a box is not a number (or, if a list, does not consist only of numbers). For example, if the result of an attempt to evaluate the square root of a negative number is used as an input to another numipulation box, the result will normally be Wrong type. This in turn, would normally cause a Wrong type error in any numipulation box dependent on it. There is an exception to this in the case of If-Then-Else (Simple), If-Then-Else (All) and If-Then-Else (List) boxes. Because these involve some form of comparison or check based on the first two arguments only, with the result being either the third (Then) or fourth (Else) input unchanged, only an error in one or both of the first two inputs results automatically in the result 'Wrong Type' for the box. This means that if, for example, the comparison/check succeeds, any error found in the fourth (Else) input is ignored. Without this exception for the three If-Then-Else boxes, any run-time error in a box on which the graphical formatters were ultimately dependent would cause repetitions to stop, and so workarounds would be needed to avoid such errors. Note: because the result of an If-Then-Else (Items) box is constructed from both the Then and Else inputs, all four are checked for errors, and 'Wrong Type' is returned if any input error is found.

Other output error messages will be relevant to specific operations, e.g.

Error: Invalid ratio of list lengths (when attempting to merge two lists)
Error: Position and lengths do not match (when attempting to merge two lists)
Error: Unequal lengths (when trying to sort one list by another)

If an error is encountered, such as a 'Wrong Type' input, when attempting to generate a display in the Graphics Formatter or Animation Zone, any repetitions underway are simply halted (as if the Stop button had been pressed).

Values Button

Once a calculation (single or repeated) has been completed, you may press the Values button in the main set of buttons on the left of the page. This presents, in the Information Zone, a summary of the calculations carried out. For each numipulation box involved in the calculation, the reference name (followed by any associated note, in parentheses), is presented. Underneath this, all the inputs are listed, together with their associated inputs (including any reference names used - not their calculated values). Next, the operation is summarized. Lastly, the resulting value of the numipulation box is displayed (but not for Common Numbers or Lists, or Memory Numbers or Lists, unless their definitions included reference names). The values are not rounded. Similar details are given for the Formatters and the inputs of the Repeat until boxes, if used.

All these are listed out in the order of evaluation. So, if A1 depends on A2, then the details for A2 will be presented before those for A1. In this way, the general flow of a set of calculations can be reviewed.

When a repetition has been carried out, only the values for the last cycle are presented.

The input text and output values are those input or derived during the calculation, even if the text has since been edited. The notes, however, are those currently in the Note fields.

Flow Button

At any time, you may press the Flow button to inspect the flow of data, or the dependencies between the various numipulation boxes and other fields. In the Information Zone, a table/graphic shows a tree-like representation of the relationships between the various numipulation boxes, fields and formatters. Below is part of one such representation.

Tableformatall
Q1
Num2
.
 
  |
  |
  '‑‑‑‑‑‑‑‑‑‑‑‑>
    depends on
 
T1
List1
.
 
  |
  |
  |
  |
  '‑‑‑‑‑‑‑‑‑‑‑‑>
    depends on
 
Num1
.
 
  |
  |
  '‑‑‑‑‑‑‑‑‑‑‑‑>
    depends on
 
Q2
Num2
.
 
  |
  |

 
  '‑‑‑‑‑‑‑‑‑‑‑‑>
    depends on
 
List1
.
 
  |
  |

 
  '‑‑‑‑‑‑‑‑‑‑‑‑>
    depends on
 
T1
@

Each element has a name with a box underneath for its associated note, so that you have some idea of what it represents.

In this example, Tableformatall, which represents the Table Formatter and all its various fields, including its row and column labels, is shown on the left. This indicates that it is an output only, so no other element is dependent on it. To the right of this is Q1, which means that at least one of its fields refers to Q1. Note that there are vertical lines down from this which lead to another element on which it depends, but this is not shown here (it has been cut off).

In turn, Q1 is shown to be dependent on Num2. This has a small dot after it, to indicate that it has no dependencies.

Q1 also has vertical lines below it, with pointers to the right showing that Q1 also depends on T1 and Q2.

T1 depends on two List1 and Num1, both without further dependencies.

Q2 depends on three elements: Num2, List1 and T1. While the first two of these have no further dependencies, T1 does, but as its tree has already been shown, it is not repeated, and a note is given afterwards that it is expanded above.

Overall, this helps you to understand your set-up better. It can also reveal some outputs on the left that you once used but no longer require and which can be deleted from your set-up. In a complex set-up, this is very likely to happen, as you will probably work in a bottom-up way, defining your data inputs, then performing calculations and manipulations of these, and so on until you define your final outputs, e.g. the Formatters. The Flow tool gives you, in contrast, a top-down view of the calculations and manipulations.

Note: Before developing this diagram, the current set-up is checked for syntax and other errors, including circularity. If any such errrors are found, a warning is given and diagram is then produced.

Note: Grafixformatall represents its various input fields, including cell formats and feedback values of the Graphics Formatter (but not the Graphics Control fields), and Animationall likewise includes the cell formats and feedback values associated with the Animation Zone.

Input/Output: Numiplets

As the Numipulator application is written entirely in Javascript and HTML, it cannot carry out file operations, such as Save, as a typical spreadsheet package would. However, Numipulator does make provision for you to save your Numipulator set-up and to load a previously-saved Numipulator set-up.

There are two approaches to saving and loading your numipulator set-ups:

  • A manual approach in which you save to a text file;
  • An approach in which your set-up is saved to your browser's local storage. This works only if your browser supports local storage. They generally do if you're accessing Numipulator over the web, but some do not if you've saved Numipulator locally on your laptop or other device.

Regardless of the approaches available to you, you should still use the manual approach using text files for long-term storage or for sharing with others, so this approach will be covered first.

At the heart of both approaches is the concept of the Numiplet.

Numiplets

A Numiplet is formatted text that defines all the relevant settings of a Numipulator set-up, namely:

  • all non-empty input field text, together with the associated selected operation;
  • all non-empty note fields
  • the Numiplet name and description for the set-up
  • the number of columns in each of the main table rows
  • various other relevant settings (e.g. Auto Start, Allow graphical input, rounding, output separator)

You can consider a Numiplet as an app that is run within the Numipulator environment.

The Input/Output section deals with inputs of Numiplets on the left side (headed Input) and outputs on the right side (headed Output), each of which has a large box or text area.

Saving a Numiplet to a text file

The standard way of saving a Numiplet is to do so manually, to a text file that you create and save in a text editing application, such as Notepad on a Windows PC or TextEdit on a Mac.

Saving a Numiplet as a simple text file is carried out as follows:

1) Give your Numiplet a description. This is particularly useful if you're intending to share it with others, but is also a good reminder for you. The Description text area is found at the top of the Input/Output: Numiplets section.

2) Give your Numiplet a name. This is done in the field called Current Numiplet Name just below the Description field .

3) Decide whether you wish any action to occur when the Numiplet is re-loaded.

You have three choices, which can be selected by use of the radio buttons under the Auto Start and Go heading in the Settings section:

  • No action. This is the default.
  • Auto Start. This means that when re-loaded the Start button will, in effect, be automatically pressed, so the Memories, Graphin1 and Graphin2 will be initiated, and a set of Repeat Until cycles begun. This can be useful for ensuring that the Graphics Formatter grid is automatically set up to display the graphical interface.
  • Auto Go. This means that when re-loaded the Go button will, in effect, be automatically pressed, and a set of Repeat Until cycles begun. This can also be useful for ensuring that the Graphics Formatter grid is automatically set up to display the graphical interface.

4) Check that you haven't got large amounts of data in your inputs, unless this data will always be needed. If you have, delete the data in the field and replace it with a comment {....} so that the system knows you wish to save details of this field.

5) Press the Create Numiplet button, with the down-arrowhead, just under the Output heading.

This deletes any text in the Output box below it and replaces it with formatted text containing the necessary Numiplet details. The name (title) always appears at the top, followed by the description, and then details of the table row widths. All the input specifications for the numipulation boxes then appear, together with the associated operation selections. Next come the other settings, including mappings and formatting definitions. And finally, the notes are listed. This Numiplet contains everything that you need to save.

6) Copy all the text from the Output box and paste it into a new text document (CTRL-A, and then CTRL-C, and then CTRL-V to paste it into the text document on a Windows PC), which should then be saved.

Please note that you can use the Numiplet you have saved as text to create a standalone browser app: a single web page that you can send to others or put on a website, which will allow others to see or play with any graphical apps you have developed.

Loading a Numiplet

To load a previously-saved Numipulator set-up, follow these steps:

1) Delete any text already in the Input box on the left (e.g. click in the field and press CTRL-A then hit the Delete button on a Windows PC). Open up the text file containing your Numiplet. Copy all the set-up text from its source document (e.g. CTRL-A then CTRL-C on a PC) and paste it into the Input box (e.g. CTRL-V on a PC).

2) Press the yellow Load Numiplet button above the box, with the up-arrowhead. This will load your Numiplet, including executing Auto Start or Go, if defined.

Important: This will overwrite any existing set-up. Just in case you had not intended to overwrite this without saving it, the existing set-up is output as a Numiplet in the Output box, as if you had pressed the Create Numiplet button. You can then choose to ignore it, save it as a text file, or reload it by pressing the Transfer Numiplet button, which transfers the text into the Input box, and then pressing the Load Numiplet button.

Built-in Numiplets

Your introduction to Numiplets should come from trying out and using the built-in Numiplets. These are Numiplets that are always available to you within Numipulator. These not only provide you with useful applications, or provide you with some fun, they also help to open your eyes to some of the possibilities open to you, and to the power of Numipulator.

The built-in Numiplets are accessible through a drop-down menu a little below the Input box. Select one of these, then press the yellow button, with the up-arrowhead, just above it, which transfers the built-in Numiplet into the Input box. This enables you to look at the Numiplet before loading it, particularly its description.

Once you are happy that you wish to load it, press the yellow Load Numiplet above the Input box. This will load it, and may begin to run the Numiplet, depending on the Auto Start setting.

Many of these Numiplets were created using a prototype version of Numipulator that did not allow more than 5 numipulation boxes in a row. This means that some inventive, convoluted ways of carrying out some operations needed to be employed.

Numiplets with local storage

If your browser supports local storage, you will find an area underneath the drop-down menu of built-in Numiplets titled Your Numiplets in Local Storage. This allows you to save and load your Numiplets to and from local storage.

Local storage is an area of storage managed by your browser. Text can be saved to this, which can be retrieved by the browser at some later time. In some ways, use of local storage is like use of cookies, except there is no expiry time with local storage. The storage available to your browser should be a minimum of 1MB - substantially larger than cookie storage. The largest built-in Numiplet would take up less than 30kB, so even 1MB should leave plenty of room. It is worth noting, however, that other pages as well as Numipulator may use local storage, and the available space is shared. Large volumes of data stored in your Numiplets can greatly increase the amount of storage required, so do try to avoid this situation. Overall, local storage is very useful, but should not be relied on long-term, so you should save your Numiplets in text files as back-up.

Numipulator provides you with 20 local storage 'drawers' for storing your Numiplets in. Initially, these are all untitled with only a skeleton content.

Saving to a local storage drawer

Saving a Numiplet follows the same first 5 steps as described for saving to a text file, so that the text of the Numiplet is in the Ouput box. Next, you select one of the 20 numbered storage drawers from the drop-down menu (preferably an untitled one), and then press the yellow Save Numiplet to Selected Destination button above it, with the down-arrowhead. The only acknowledgement you get for this is that the drop-down menu reverts to its default message. Note: The Numiplet name is used as the name of the drawer. The former contents of the 'drawer' are saved to the Backed-up Numiplet.

Loading from a local storage drawer

To load a Numiplet from a local storage drawer, select it from the drop-down menu on the left, then press the yellow Transfer Saved Numiplet to Input box button above it, with the up-arrowhead, so that the stored text of the Numiplet is put into in the Input box. Finally, press the yellow Load Numiplet button to load it into Numipulator, as with loading from a text file.

Direct Save

Numipulator also has a single Current Saved Numiplet drawer. Press the yellow Save button, with the down-arrowhead, to save the current state of your Numipulator set-up as the Current Saved Numiplet, without first moving it into the Output box. This overwrites any existing content, which is saved as the Backed-up Numiplet. You can also press the main Save button on the left.

To restore the Current Saved Numiplet, press the Transfer Current Saved Numiplet to Input box button, with the up-arrowhead, to put the text into the Input box. From there you can load it, as previously described.

Auto Save on Exit

As described earlier, if your browser supports local storage and also allows actions when you exit Numipulator, your current Numipulator set-up is saved automatically as the Current Saved Numiplet when you exit (and the overwritten content is saved as the Backed-up Numiplet).

The Current Saved Numiplet, whether saved automatically or by use of a Save button, should be automatically restored whenever you open or reload Numipulator (with the same browser and device). You can also restore it manually via the Transfer Current Saved Numiplet to Input box button, or through the List button (see next).

List button

The central yellow List button lists, in the Information Zone, the contents of all 20 local storage drawers, followed by the Current Saved Numiplet and the Backed-up Numiplet. This is your only means of accessing the Backed-up Numiplet, if needed. Probably more importantly, it means you can save all these Numiplets in a text file in one go by copying and pasting them into a text file.

Exiting from Numipulator without Auto Save

If you don't have local storage, or your browser doesn't support autosaving on exit, your current set-up cannot be saved when you exit Numipulator, so try to remember to save it using the Save button on the left before exiting. This is always good practice. If you forget, there may be an alternative: Numipulator always attempts to write your current set-up to a box in a pop-up window, so that you can save it afterwards. Note: Many browsers do not allow the opening of a new pop-up window on exit (see www.numipulator.com for more details), so do try to remember to Save your set-up.

Making Standalone Browser Apps

If you have created and saved a Numiplet, one that uses the Graphics Formatter or Animation Zone, you may create a standalone app that should run in any browser. Essentially, what you end up with is a version of Numipulator in which all the fields and buttons apart from a few are hidden. Your Numiplet is loaded automatically, and, depending on your Numiplet, either the Graphics Formatter or the Animation Zone will be displayed, but heavily modified so that only the fields the user needs to see are displayed. The user is unable to see or change any of the controls and sees just the graphics, the relevant note underneath the graphics, the relevant Feedback field and the app name and Description. For the Animation Zone, the keypad is, of course, also available. In addition, the user sees the Start, Stop and Go buttons, plus an additional Data button. The Data button makes available to the user versions of the longer input fields (Num1, Num2, List1 and List2), so that they can modify these if desired. You should, therefore, use these fields only for data that you wish the user to be able to modify, e.g. some basic input data, or control data that indirectly is used to control your app. So, for example, if you wish the user to be able to change the delay time with the Graphics Formatter, define the delay in Num1, say, and then define Control1 as Num1. Remember to provide the user with instructions about this in your Description.

To create standalone apps, open up the Standalone Maker page, which can be found on the numipulator web site at http://www.numipulator.com/standalonemaker.htm. You will be prompted to specify a background colour, to paste in your Numiplet text, and then to press the Create App button. This will generate the HTML and Javascript code required for your standalone page, which you can copy and paste into a text file and save as a .htm or .html file, ready for use.

Settings

The Settings section has three sub-divisions, each covered elsewhere in the Help:

Display Links

Near the top of the Numipulator page are four Display links, all of which are displayed in the pop-up window.

Getting Started

This provides advice on getting started with Numipulator.

Functions

This gives a full listing of the functions and operations found in the various types of numipulation box.

Codes

This lists the codes used to specify formats (colours, borders, shapes, etc.) in the Graphics Formatter and Animation Zone and also the number codes used to specify functions, operations and comparisons in a number of 'meta-level' operations.

Description

This displays the description found in the Graphics Formatter.

Text

This presents a text version of the current program. In the main Numipulator interface, the contents of fields, particularly list fields, cannot always be seen easily. This presents all numipulation boxes in use using the format:
Reference Name (Type) Associated note
Input-1=Specification-1
...
Input-n=Specification-n
Function: Selected function name (if there is one)

This can be a useful format for looking at the program. You can also copy this into a text editor and search for text. However, it cannot be used for loading the program.

Versions of Numipulator

This version of Numipulator is for an individual's non-commercial use only or for non-commercial educational purposes. Companies, corporations and other organizations may purchase Corporate Licences from TopAccolades Ltd. These may include corporate headers and logos. Details may be obtained at http://www.numipulator.com.

Terms of Use

See the Terms of Use section at the bottom of the main Numipulator page.

About Numipulator

Numipulator was designed and developed by Dr David Wolstenholme.

Numipulator is a registered trademark of TopAccolades Limited.

Copyright TopAccolades Limited, 2023