Recent content by Jay1

  1. Jay1

    MHB A PHP Function To Perform Nth-Order Lagrange Interpolation

    The following Lagrange interpolation function is extremely useful. It can be used in just about any branch of science. I use it extensively in astronomical computations for such things as finding the dates and times of the seasons over thousands of years and phases of the moon at any given...
  2. Jay1

    MHB Tests of Divisibility- Simple tricks

    Yes, I noticed. It's amazing some of the math that far predates calculators and modern computation methods. I often marvel at what they could do in the ancient past and I still use concepts developed by ancient Greeks to develop my programs today. Imagine what Newton or Einstein could have...
  3. Jay1

    MHB Tests of Divisibility- Simple tricks

    Interesting. Apparently I stand corrected. A book I have shows various methods of testing divisibility, but they skip 7 and say no specific method exists other than trial and error. But that book dates back to the 1970s, when the Earth was young, we were on the verge of another ice age and...
  4. Jay1

    LaTeX Testing LaTeX (powered by MathJax)

    You insert LaTeX code verbatim like this using CODE and /CODE tags enclosed within square brackets. Everything between the tags will be listed verbatim. $$X = \sum_{n=0}^5\left(\left(\sum_{j=1}^k A_{X,n,j} \cdot {cos(B_{X,n,j} + t \cdot C_{X,n,j})}\right) \cdot t^n\right)$$ which...
  5. Jay1

    MHB Tests of Divisibility- Simple tricks

    As I understand it, a specific test for divisibility by 7 has not yet been discovered. Where's Fermat when we need him?
  6. Jay1

    MHB Computing The Arbitrary-Precision Value Of N-Factorial In PHP

    The general integer factorial can be expressed by the equation: $$N! = \prod_{x~=~1}^N {x} = {1 \cdot 2 \cdot 3 \cdot ~~...~~ \cdot N}$$ This simply means that N-factorial is the sequential product of all integers from 1 to N. Below is a simple PHP function to compute the arbitrary-precision...
  7. Jay1

    MHB Computing The Arbitrary-Precision Nth Root Of Positive (X) In PHP

    PHP has some powerful arbitrary-precision (BC or binary calculator) arithmetic functions which seem to be greatly underused and only consist of the basic arithmetic operations, a square root function, a mod function and an integer power function. However, those basic operations can be used to...
Back
Top