Questions tagged [natural-logarithm]

Use this tag for questions related to Natural logarithm which is logarithm to the base `e`. The natural logarithm is generally written as `ln x` or `ln(x)`.

Natural logarithm is logarithm to the base e, where e is approximately equal to 2.718281828 (though, like π, it's a transcendental number). The natural logarithm is generally written as ln x or ln(x).

87 questions
-1
votes
1 answer

Matplotlib plotting ln functions

Ok, so Im not sure if this is even possible. I am trying to plot a graph in python, using matplotlib, that has a natural log function of both x and y. First, I looked for posts containing instructions on how-to plot using a natural log. I found…
zsad512
  • 861
  • 3
  • 15
  • 41
-1
votes
1 answer

Logarithmic trendline different for scatter plot versus linear plot

I am having an issue where the logarithmic function is behaving differently depending on the type of graph I use with the same data. When I generate the equation by hand, it returns the scatterplot linear trendline, but the slope function and linear…
TigermanSD
  • 77
  • 1
  • 2
  • 7
-1
votes
2 answers

logstar function_the iterate of the natural logarithm_r

In R, I would like to create a function that returns the smallest n such that the n-th repetition of the natural logarithm gives a value smaller than one. Ex.: fun(9182) = 3 because ln(ln(ln(9182))) = 0,793 < 1. Any suggestions will be appreciated!
star_star
  • 11
  • 1
-2
votes
1 answer

Calculating log to the base 2 in java gives inaccurate results

Consider this program to determine if a given number is a power of 2. class Solution{ // Function to check if given number n is a power of two. public static boolean isPowerofTwo(long n){ // Your code here float…
Ananya
  • 1
  • 1
-2
votes
1 answer

solution for integral of x/(x-6)dx

I was trying to solve this integral x/(x-6)dx and I used substitution. u = x-6 and x = u+6. In the end, I ended up with the answer x+6ln|x-6|-6+C, however, the answer is x+6ln|x-6|+C without the -6. Can someone help me understand why this is the…
-2
votes
2 answers

derive exponential function using log() in C

I am trying to derive exponential function using logarithms. I know from below equation log(22026.4657948067), is 10 and exp(10) is 22026.4657948067 I would like to understand the basic math behind exp() and log(). At the moment, I have log() in C…
Coder
  • 27
  • 7
-2
votes
1 answer

How does log() differentiate between log base and natural log?

I am new to coding, and am a bit confused by how C++ differentiates between log base (any number) and natural log (base e) if both are represented by the same log() function. Can anyone shed some light on this for me?
-2
votes
1 answer

Changing the pitch of a imported signal logarithmically / exponentially over time

How can I change the pitch of an imported signal logarithmically / exponentially over time? Please note that the imported signals that will be used are not single frequencies so a simple sweep or a chirp command will not work since I will be…
Rick T
  • 3,349
  • 10
  • 54
  • 119
-2
votes
1 answer

Why does R round natural logarithms as it does?

I was perplexed by the difference in R: log(0.0001)/0.0001 -92103.4 and, e.g., Google calculator rendering: ln(0.0001)/0.0001 -92103.4037198 why is the rounding so different?
user1603472
  • 1,408
  • 15
  • 24
-2
votes
1 answer

Linear Scale vs. Log Scale

This may be a very simple question, but I haven't been in touch with Algorithms since a while. I have a logarithmic scale of 20,100,500,2500,12500 which relates to 1,2,3,4,5 on the respectively. Now, I want to find out as to where the value 225…
-3
votes
2 answers

'e' the base of natural logarithm in python

name 'e' is not defined I ma getting this error in my python code. I have already imported the math and the numpy modules. What more do I need?
Nisha
  • 33
  • 7
-4
votes
1 answer

Is there a Python command that allows one to enter the logarithm of a function?

I'm writing some code to simulate a system of ODEs in Python and, as part of one of the ODEs, want to enter the natural logarithm of a function. However, I'm not able to find an appropriate way to do this, as it seems all the log/ln commands only…
Anonymous
  • 41
  • 1
  • 3
1 2 3 4 5
6