I was fiddling around with C++ and iterations and I found an algorithm for computing ln(x).(adsbygoogle = window.adsbygoogle || []).push({});

n = any number, the higher, the better the approximation

ln_x = 0;

divisor = 10^n;

while ( divisor <= x*10^n ) // Where x is the ln(x) you want to find.

{

ln_x += 1 / divisor;

divisor++;

}

What it does is add all integer fractions from 1/10^n to 1/x*10^(n+1).

**Physics Forums - The Fusion of Science and Community**

Join Physics Forums Today!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

# Ln(x) algorithm

Loading...

Similar Threads - algorithm | Date |
---|---|

B Non-algorithmic math | Oct 13, 2017 |

I Algorithm to create a composite score | Sep 12, 2017 |

I Arm reaching algorithm determine angles | Aug 14, 2017 |

A Optimization constraints formulation for GA | Jun 28, 2017 |

I Proving Euclidian Algorithm | Nov 12, 2016 |

**Physics Forums - The Fusion of Science and Community**