It is nice to have what we have but having more native advanced math functions would be great.

# More math functions

- Comment • 5

- Comment • 5

Active

Score8

It is nice to have what we have but having more native advanced math functions would be great.

FileMaker already compares pretty well with the math standard libraries of other languages. We already have exponents and cube roots (and any other real-numbered root), e.g., try 8^(1/3).

Technically, we already have the building blocks to create any math functions we want. Still, having more built-in makes for potentially faster execution. On the other hand, some math operations (differentiation & definite integration, for example) can have significant tradeoffs between calculation speed, precision, and other factors; and we'd want those types of operations to stay out where we can decide what tradeoffs to make as appropriate for each application. If using a different algorithm to calculate the result would make a substantial difference, I don't think it would be a good fit to have built-in. I'd want FileMaker to avoid optimization algorithms, for example.

There are some things that other languages commonly have that aren't more "advanced", per se, but very convenient to have and non-temperamental enough that a built-in version would be fine for almost all uses:

- error functions (see erf, erfc in the C standard library, or python standard library)
- gamma functions (see lgamma, tgamma)
- hyperbolic functions (e.g., sinh)
- separate functions for Ln ( x - 1 ) and Exp ( x ) - 1
- atan2 ( y ; x ) (more of a programming convenience than a mathematical one)

To second Christian's comment, not having bit-wise operators has made me bend over backwards many times to port algorithms to FileMaker that are substantially simpler in other languages.

For inspiration on more truly advanced math, we can look at add-on libraries for other languages.

With the emphasis on mobile apps and location-based functionality, having distance and path end-point calculation functions ("forward & inverse geodesic problem") (such as using GeographicLib) built-in would be useful for many FileMaker apps.

Anything in the NumPy or SciPy libraries would be great, but these stand out as especially useful building blocks:

**LINEAR ALGEBRA**(would require a new data type to do well)- Determinant
- Decomposition
- Eigenvalue, eigenvector, eigenmatrix
- Inner product. Dot product.
- Matrix multiplication. Matrix inverse. Norm.
- Map (already another feature request)
- etc.
- Fast fourier transform
- Order statistics (arbitrary quantile/percentile from a list)
- ... Including inverse, i.e., both "given a quantile, return the data value at the cut point" and "given a data value at the cut point, tell me the quantile"

jbante I am glad you had time to expand on this. When I wrote the original post I had had a few drinks already and did not want to have things go wrong so I made it short.

I had no idea that 8^(1/3) would work.

FM does have a good number of base math functions and I guess what I am asking for is some development on more conveinient standard implementations of common calculations as time goes on. A few more common stat functions as you point out would be good.

Summation, differentiation and integration are generally something that should not be standardized into a function. I was just curious how people are managing it.

Functions for matrices would be nice.

you should get more specific: Which math functions are you missing?