Setup and general usage#
XlCalcNet is a numerical library with parts written in Python and other parts written in C#, C++, C and Pascal, with focus on numerical calculations in multiple precision and data visualisation.
Since one of the main goals is to give access to software written in Python (or via PythonNet software written in C#) from within spreadsheet formulas, a dedicated CPython installation is strongly recommend, to make it easier to configure the interaction with Microsoft Excel and/or LibreOffice Calc, without disturbing existing Python installations.
The interaction with LibreOffice Calc is based on the fact that LibreOffice has built-in support for writing spreadsheet functions (which appear in the Function Wizard) in Python.
The interaction with Microsoft Excel is achieved by running a socket server written in Python, which is called from spreadsheet formulas using the functionality provided by Excel.Dna.
On the Python side XlCalcNet uses Mpmath 4.0 to provide a rich set of functions in arbitrary precision, using not only Mpmath’s binary and interval data types, but also Python’s built-in Decimal and Fraction data types. If GMP2 is installed, its data types can be used in many cases instead of Mpmath’s binary data types, being much faster. Likewise, if Python-Flint is installed, its data types can be used in many cases instead of Mpmath’s interval data types, being much faster, and often also more accurate.
On the C/C++ side, XlCalcNet uses DAMath, Boost Math, Boost Multiprecision and Eigen to provide numerical functions in single, double, extended, quadruple and octuple precision, which are available to the user both from C# and Python.
The XlCalcNet2 library, which is licensed under the LGPL-3.0 and is therefore provided as a separate project, is based on Boost Math, Boost Multiprecision, Eigen, GMP, MPFR, MPC and Flint and provides additional functions for the same fixed-precision data types as XlCalcNet and also in arbitrary precision.
XlCalcNet is intended to be used together with existing Python libraries like NumPy, Matplotlib, Pandas, SciPy. It can also be used from recent versions of RStudio and R, using the reticulate package.
Setup and general usage
- Setting up XlCalcNet
- Installing XlCalcNet
- Installing and using Python.NET: Calling C# from Python
- Installing and using the Tiny IDE as a Python application
- Installing and using Numpy, Matplotlib, Pandas, Scipy, Seaborn, Statsmodels and Scikit-learn
- Calling Python from C:#: socket server vs in-process calls
- Reasons for using multiprecision arithmetic
- Rebuilding the .dll files of XlCalcNet and XlCalcNet2 from source code
- Using XlCalcNet within MS Excel
- Using XlCalcNet within LibreOffice Calc
- Preparing LibreOffice Calc for using XlCalcNet
- Using the Python standard library functions within spreadsheet formulas
- Using Numpy, Matplotlib, Pandas, Scipy, Seaborn and XlCalcNet within spreadsheet formulas
- Using links to external
*.csv,*.xlsxand*.svgfiles - Managing procedures instead of functions
- Exporting and uninstalling
- General user interface and functions
- The Tiny Data Viewer
- The Output Monitor
- The Gallery of Plots
- Interactive 3D wpf plots
- Functions related to folders
- Information about installation status of supporting python packages
- Information about context lists, and setting global precision
- Support for running interactive Matplotlib output in a separate process
- Mathematical functions based on Mpmath, Gmpy2 and Python-Flint (only Python)
- Overview
- Double-precision arithmetic:
fpm - Binary floating-point with arbitrary-precision and exponent:
mpm - Interval arithmetic with arbitrary-precision and exponent:
ipm - Decimal floating-point in arbitrary-precision with limited exponent:
dpm - Rational numbers:
qpm - Binary floating-point in arbitrary-precision with limited exponent:
gpm - Binary balls in arbitrary-precision and with arbitrary exponent:
apm - Numpy support for multiprecision data types:
npm
- Mathematical functions in fixed precision (C#, can be called from Python)
- C# based context groups
- Scalar functions with
DoubleandComplex:math53andcmath53 - Binary floating point, single precision:
srealandscplx - Binary floating point, double precision:
drealanddcplx - Binary floating point, extended precision:
erealandecplx - Binary floating point, quadruple precision:
qrealandqcplx - Binary floating point, octuple precision:
orealandocplx - Use of Numpy with scalar functions written in C#:
np53,np53c - Building the underlying C#, C/C++ and Pascal libraries
- Mathematical functions based on XlCalcNet2 (C#, can be called from Python)
- Binary floating point, multiple precision:
mreal,mcplx - Binary arbitrary precision ball:
aflintandaflintc - Binary floating point, single precision:
sflintandsflintc - Binary floating point, double precision:
dflintanddflintc - Binary floating point, extended precision:
eflintandeflintc - Binary floating point, quadruple precision:
qflintandqflintc - Binary floating point, octuple precision:
oflintandoflintc - Binary floating point, multiple precision:
mflint,mflintc - Building the underlying C# and C/C++ libraries
- Binary floating point, multiple precision:
- Building user libraries and documenting them