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
0
votes
1 answer

TypeError: can't multiply sequence by non-int of type 'float' when using numpy.linalg.slogdet()

I am trying to calulate val but I get a type error. This is a small part of matrix used in the calculation to show the data type it contains, original matrix is 30x30. covM = [[ 9.81431930e-02, -6.94931008e-03, -1.28573646e-02], …
RishtarCode47
  • 365
  • 1
  • 4
  • 18
0
votes
1 answer

how to find sum of logarithm values

I just started learning Python 3 and I have the following problem to solve: "Write a program that computes the sum of the logarithms of all the primes from 1 to some number n, and print out the sum of the logs of the primes. a. input: integer n b.…
Angel
  • 9
  • 1
0
votes
1 answer

How do I reverse this ln power function of a slider?

I was able to translate this from LTSpice potentiometer code by Helmut Sennewald. But math is not my thing so I'm not sure if it is possible to reverse this so that if given point on ln segment algorithm would return corresponding value on original…
Tonecops
  • 127
  • 9
0
votes
4 answers

How to apply a natural logarithm to a matrix and obtain zero for when the matrix entry is zero

In Python I have a Matrix with some zero values, how can I apply a natural logarithm and obtain zero for when the matrix entry is zero? I am using numpy.log(matrix) to apply the natural logarithm function, but I am getting nan when the matrix entry…
DiegoA86
  • 1
  • 3
0
votes
2 answers

Base 2 matrix logarithm in MATLAB

I know there exists MATLAB functions for log and log2, and for matrix logarithm there is logm. But I was wondering how do I calculate matrix logarithm for base 2?
QuestionEverything
  • 4,809
  • 7
  • 42
  • 61
0
votes
1 answer

Integer part of logarithm

Please, does anyone know how to compute the integer part of natural logarithm of an integer? Preferably using integer arithmetic only (akin to integer square root method), without relying on floating-point log (i.e. not Math.floor(Math.log(x)). To…
Ecir Hana
  • 10,864
  • 13
  • 67
  • 117
0
votes
1 answer

logarithmic constraints in gurobi

I am trying to solve a model with gurobi optimizer in python. Part of one constraint is logarithmic: import numpy as np k = beta * np.log(f_var) model.addConstr(t_var == t0 * (1 + alpha * k)) t0, alpha and beta are given, but f_var and t_var are…
sali
  • 33
  • 11
0
votes
1 answer

How to interpret transformed independent and dependent variables in summary(lm)?

Call: lm(formula = GROWTH ~ log(X1) + log(X2) + log(X3) + log(X4) + log(X5) + log(1 +X6) + log(1 + X7) + log(X8) + log(X9) + log(X10) + log(X11) + log(X12) +…
UnsoughtNine
  • 63
  • 1
  • 8
0
votes
0 answers

Plotting relationship b/w a Categorical DV and Continuous IV

I have recently submitted a paper that demonstrates that a categorical outcome variable (0 = irregular verb production; 1= regular verb production) is significantly predicted by a continuous variable (phonological similarity to existing verbs).…
0
votes
1 answer

R: Exponent returning infinity

I need to remove logarithms of my data and thus am taking e to the power of the values which are logarithmed. My issue is that when I have e to the power of more than 709 R returns the value of infinity. How can I surpass this? e^710 [1] Inf…
John_Doe
  • 95
  • 1
  • 11
0
votes
0 answers

R and ggplot2: How to turn axes into logarithmic scale? Given confidence interval constraints

I'm new here and would really appreciate some help! I've got a simple r script to plot log transformed data using ggplot and also plot on the 95% confidence and prediction intervals. However, I'm stuck on how to format the axes... I'd like them to…
0
votes
1 answer

Looking for good scale factor for converting log to 8.8 fixed point

I have a range of numbers in (0, 1] I would like to take the natural log of these numbers, and then store as 8.8 fixed point. My foruma is K*ln(x) + (1<<16) but I am not sure what the best value is for K . My thinking is that if x doubles, then…
Jacko
  • 12,665
  • 18
  • 75
  • 126
0
votes
0 answers

R Commander ERROR: could not find function "Log"

Very new to R, still using drop down menus for my degree. Code comes in next semester im unsure of all this jargon. Basically i need to transform data with Logs and R cant find logs on my laptop. frustrating because it works fine at uni. please send…
0
votes
2 answers

using math.log(var) in python

I think if I'd know the math behind it I might have figured it out by myself. When I call math.log10(0.0000000000001) I get -13. But how do I convert this back into 0.0000000000001? and how i'd handle it when using math.log(0.0000000000001)? Both…
bngschmnd
  • 111
  • 1
  • 10
0
votes
0 answers

Defining in a funky differential equation in python. (Not Trying to solve)

Sorry, I'm not entirely sure how to define this differential equation in python. I understand there is a equation inside the equation, but how would you define this differential equation of natural log? The above equation stems off of the actual…
iron2man
  • 1,787
  • 5
  • 27
  • 39