paceval. 4.25
Documentation of the paceval. source-code, Copyright ©1994-2024. Version 1.x, 2.x, 3.x, 4.x ©1994-2024 Joerg Koenning & paceval.[Registered Trade Mark] All rights reserved., Author(s) : Joerg Koenning
No Matches
paceval. the system independent mathematical engine

paceval is a mathematical engine that can calculate almost any complex mathematical expressions. The software reads a textual description of the expressions as a mathematical function, which may contain the basic arithmetic operations, the usual transcendental functions (trigonometry, exponential function, etc.) and other common operations. Expressions can contain any number of placeholders (variables). Calculations are performed in selectable precision (single, double and extended) and distributed across all available processors for maximum speed and effectiveness. Additionally, paceval can also output an interval indicating the error limits due to the limited precision of floating point number formats. paceval internally creates and processes linked lists of atomic calculations that represent the user's mathematical expressions. The processing of the linked list when actually performing a calculation with values for the variables is done in a single C function that is called by each thread of the underlying system.

paceval uses multithreading intensively to achieve maximum performance and energy efficiency of the respective hardware system. The main handling of multithreading in paceval in software is in the file paceval_fThreadHandling.cpp. paceval can also be used as a hardware driver for a new type of energy-efficient coprocessor. To do this, only the handling in the file paceval_fFPGAHandling.cpp has to be adapted to address the customer-specific hardware such as an FPGA.

The source code performs this processing (this corresponds to the standard cycle used by all types of processors):

  1. FETCH - Get the operator and operands (e.g. "addition of 2 and 3")
  2. DECODE and DECIDE - Use the cached result from the cache or call the next step EXECUTE
  3. EXECUTE - Execute the operator with the operands (e.g. call the C function to add 2 and 3 and get 5 as a result)
  4. WRITE BACK - Cache the result of the atomic calculation (this includes lower and upper interval limits or errors)

Essentially only two steps are necessary to perform calculations. A computation object is first created ("Create" step) by the user passing a function and the set of variable identifiers. Concrete calculations can then be carried out again and again ("Calculate" step) with the object that has been created by the user passing the values for the variables. In the "Create" step, a list of the individual atomic calculation rules is created with the computation object and aligned for maximum parallelizability. The user receives back a unique ID or "token" for the created object. Any number of computation objects can be created. In addition, there is no limit to the length of the function and the number of variables. In the "Calculate" step, the calculation is carried out using the values for the variables. The list of individual atomic calculation rules is distributed as partial sequences across all available processors or threads in the system in order to achieve maximum speed. In addition, complex calculations of partial sequences that have been carried out once are temporarily stored as a cache so that they do not have to be calculated again if necessary. All mathematical functions can be calculated and combined with logical operators. This allows all financial, stochastic, engineering and scientific functions and also all models for machine learning to be represented. In addition, the usual standard mathematical notation can easily be used.

The following operators, partial functions and symbols are currently supported:

  • Basic arithmetic operations +, -, *, /
  • Logical operators NOT, AND, OR, XOR, NAND, XNOR
  • Comparison operators <, >, =, >=, <=, <>
  • Factorial !, fac()
  • Constants pi, e
  • Brackets ()
  • Power/root functions ^, sqr(), sqrt(), exp()
  • Logarithm functions and sigmoid function lg(), ln(), sig()
  • Trigonometric functions and associated inverses sin(), cos(), tan(), cot(), asin(), acos(), atan(), acot()
  • Hyperbolic functions and associated inverses sinh(), cosh(), tanh(), coth(), arsinh(), arcosh(), artanh(), arcoth()
  • Numerical manipulations sgn(), abs(), round(), ceil(), floor(), rand()
  • paceval specific numerical manipulations ispos(), isposq(), isneg(), isnegq(), isnull()
  • Minimum and maximum min, max
  • Modulo symmetric and mathematical variant %, mod

This is the list of the main API: