
The CodeCogs Instant Calculators are a simple concept of turning inanimate C/C++ functions into live programs that can be called and tested throught a web interface.
By submiting code into CodeCogs, the documentation wizard is able to determine all the input variable and the return. With the users description of each variable the CodeCogs website automatically generates an instant calculator interface. In the backend the submited code is also reviewed and considered by the CodeCogs team. Here they check the code has genuine intent (it isn't a virus or liable to produce misleading results) and if ok it is compile into a fast module that can be called in quick sucession. The calculator is then complete and will be live and visible through the website.
Usage of the calculator we hope self explanitory:
To plot a graph, you obviously need a series of points. Most function return only a single value, therefore you need to call the function multiple time with different inputs. The changing input is establishing by defining a range within one of the input variable (anyone you choose).
A range is defined using colons. For example:
If the function you are using has multiple inputs and you specify a range value for more than one of these, then the final graph will contain multiple plots. The parameter with the greatest number of points always forms the x-axis.
Having establish the set of value and at least one range for the function, the graph is created by clicking the 'Graph' button at the bottom of the instant calculator
Instead of plotting a graph, the calculator can also be used to produce a table of results. Just like a graph, at least one of the input must contain a range parameter, thereby allowing multiple outputs to be produced. See 'Plotting Graph' above for details. Once the input are established, click the 'Table' button at the bottom of the instant calculator.
The CodeCogs calculator uses a technology called AJAX to comunicate with the server and perform the calculations. This approach enables the results to be shown without the screen refreshing. For this to work, Javascript must be available and be enable. Although the calculator can be shown in a number of circumstances, including for example other websites and emails, if the end-users browser or email application does not accept Javascript then the system will not work.