====== Number formats and value ranges ======
CGRAPH expects numerical values to be entered in many input fields. The formats and possible value ranges for such entries are explained below.
===== Default values in input fields =====
CGRAPH enters a default value in each input field. When you first start the programme, these are predefined values, but any changes to these values are saved as soon as a graph is created. The last values entered are then displayed the next time the graph is called up.
Right-clicking in an input field for real or complex numbers also displays a context menu that shows a series of [[default values|predefined numbers]] (e.g. pi, 2*pi, ...) as well as your last 5 entries, separated into real and complex numbers. This makes it much easier to change these values.
===== Integer numbers =====
Integer numbers consist of a sequence of digits without a decimal point. Many input fields in CGRAPH limit the value range to a small interval; sometimes, for the sake of simplicity, a slider is provided instead of a number input. If free input is possible, the value ranges appear as a floating window when the mouse is moved over the input field.
===== Real numbers =====
Real numbers consist of the integer part, a decimal separator, the fractional part and a mantissa. Their value range is between -101000 and +101000; a full stop or comma can be used as the decimal separator, and “E” can be used as the mantissa sign. Correct numbers are, for example
^ Real number in CGRAPH ^ Meaning ^
|-1.678E156|-1.678*10156|
|10.56|10.56|
Instead of numerical values, complete formulas can also be entered. These must be structured according to the CGRAPH [[function syntax]], but may not contain any variables or parameters. The decimal separator is the character set system-wide on the computer, usually a comma or a point.
===== Complex numbers =====
Complex numbers consist of a real part followed by an imaginary part, which are represented in the same way as real numbers. The imaginary part is indicated by the imaginary unit i or j. Purely real or purely imaginary numbers can also be entered. Correct numbers are, for example
^ Complex number in CGRAPH ^ Meaning ^
|2.56-7.34i|2.56-7.34i|
|2i|0+2i|
|1.6E2+1.5E4j|1.6*102+1.5*104i|
|2.45|2.45+0i|
Instead of numerical values, complete formulas can also be entered. These must be structured according to the CGRAPH [[function syntax]], but may not contain any variables or parameters. The decimal separator is the character set system-wide on the computer, usually a comma or a full stop.
===== Real number pairs =====
For entering two coordinates, CGRAPH defines real number pairs consisting of an opening bracket, a real number, a colon as a separator, a second real number and a closing bracket. The brackets can be omitted when entering the numbers. Correct numbers are therefore
^ Real number pair in CGRAPH ^ Meaning (x/y) ^
|(1.1:1.2)|(1.1/1.2)|
|2.56:-7.3E2|(2.56/-7.3*102)|
|2.56|(2.56/0)|
|:3.14|(0/3.14)|
Instead of numerical values, complete formulas can also be entered. These must be structured according to the CGRAPH [[function syntax]], but may not contain any variables or parameters. The decimal separator is the character set system-wide on the computer, usually a comma or a full stop.
===== Real number triples =====
Real number triples are an extension of real number pairs, in which a third real number is additionally interpreted as the z-coordinate. Here, too, the colon is used as the separator. Correct numbers here are
^ Real number triples in CGRAPH ^ Meaning (x/y/z) ^
|(1.1:1.2:1.3)|(1.1/1.2/1.3)|
|2.56:-7.3E2|(2.56/-7.3*102)/0|
|2.56|(2.56/0/0)|
|:3.14|(0/3.14/0)|
|::3.14|(0/0/3.14)|
Instead of numerical values, complete formulas can also be entered. These must be structured according to the CGRAPH [[function syntax]], but may not contain any variables or parameters. The decimal separator used is the character set system-wide on the computer, usually a comma or a full stop.
===== Angles =====
Angles are entered in CGRAPH in degrees. The numerical values correspond to the format of real numbers; to indicate the degree format, the symbol ° is always appended to the output. It is not necessary to include this when entering values.
===== Constants =====
CGRAPH recognises various constants that are automatically converted into numerical values when entered
^ Constant in CGRAPH ^ Meaning ^
|pi|Circular number 3.1415927...|
|e|Euler's constant 2.71828182845...|
|tau|Golden ratio 1.6180339887...|
(The less common term ‘tau’ is used here for the golden ratio because the more familiar term ‘phi’ is already defined as a variable name for angles.
[[Basics|Back to overview]]