473,466 Members | 1,370 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Calculating ln()

65 New Member
Hi,

I'm trying to make some calculations on zome vars I've got. Now in Excell there is a function ln() (natural logarithm), I need the same function in access. Now in access I can only find the log() function. It doesn't return the same value.

Thanx
Twanne
Jul 27 '07 #1
6 16287
Twanne
65 New Member
I've solved the problem. It was a purely mathematical problem.

Log(x) = ln(x)/ln(10)

So ln(x) = Log(x) * ln(10)

For everybody who happens to run in to this problem.
Jul 27 '07 #2
MikeTheBike
639 Recognized Expert Contributor
I've solved the problem. It was a purely mathematical problem.

Log(x) = ln(x)/ln(10)

So ln(x) = Log(x) * ln(10)

For everybody who happens to run in to this problem.
Im now sure that solves your problem as you cannot sole the equation for Ln(x) without using Ln() ?

I think it should be
ln(x)=Log(x)/Log(e) ??

MTB
Jul 27 '07 #3
Twanne
65 New Member
ln(10) is a fixed number you can calculate ;)

but actualy, the formulae worked. But then I came across the problem that LOG(x) in excell and Log(x) in vba are two different things. Log(x) in vba is the same as LN(x) in excell. This is probably to keep things "simple". I have no idea why microsoft did this but I figured it out.
Jul 30 '07 #4
missinglinq
3,532 Recognized Expert Specialist
Micro$oft corporate policy is to never make anything too easy!

Linq ;0)>
Jul 30 '07 #5
MikeTheBike
639 Recognized Expert Contributor
Micro$oft corporate policy is to never make anything too easy!

Linq ;0)>
I will definitely second that!

However, ln(10) is calculable, but not using the ln() function, as it doesn't exist, thus making the statement invalid!

In fact,
ln(10) = 1/LOG(e) [where Log is to base 10]
so you could use this in code, assuming you know what 'e' is!

Having said all that, looking at both Excel & Access Log functions (in VBA), both only have a built in natural log function, so I am not sure what the problem is/was ???


MTB
Jul 30 '07 #6
Twanne
65 New Member
Wel I needed to calculate ln() af a certain value, but because ln() isn't a function in VBA I needed to get around it.

Like MTB said ln(10) = 1/LOG(e) in real math. But as you can see real math isn't used by microsoft. I also said before that ln() in excell is the same as LOG() in vba (why this is so, I don't know).
Anyhow I got around it by using LOG() in vba for ln() in ecxell.

For the record e is a constant: 2.71828182845904 (had to search it to because I didn't know it by hart myself :D )

Greetz
Twanne
Jul 30 '07 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

5
by: Ron Adam | last post by:
Hi, I'm having fun learning Python and want to say thanks to everyone here for a great programming language. Below is my first Python program (not my first program) and I'd apreciate any...
0
by: Kasp | last post by:
Hi there, I am trying to make an OLAP cube on a table having two columns (datetime, Number_of_times_an_event_occured). My dimension is time and I want to measure the Min and Max times an event...
21
by: Protoman | last post by:
How do I calculate the log of a number? Don't tell me to use log in cmath; I'm trying to learn complex math in C++. Got any tips/ideas on how to do this? Thanks for the help!!!
1
by: Joe Bongiardina | last post by:
What does the message "calculating...." mean in the lower left status area of a form? I have a form with no calculated, concatenated or lookup fields, yet it displays this msg. The form takes...
1
by: jlm | last post by:
I have a form which feeds table (TblEmpLeave) of Employee Leave Time (time taken off for Administrative, Annual, Sick, Compensation leave). I have EmpID, LeaveDate, LeaveType, LeaveHours fields on...
0
by: robin9876 | last post by:
In an Access 2000 database on some forms 'Calculating...' is continuously displayed in the status bar window and the text of the control is automatically selected. The only workaround is switching...
5
by: sugaray | last post by:
Hi, my problem with calculating the size of an array is when I pass an array as a parameter to a function which perform the calculation, the result never comes right, like below: int...
25
by: Umesh | last post by:
i want to calculate the time required to execute a program. Also i want to calcute the time remaining for the execution of the program. how can i do that? pl mention some good websites for...
2
jkmyoung
by: jkmyoung | last post by:
Calculating Large Exponents Background: This is a quick article as to how to calculate the exponents of large numbers quickly and efficiently. Starting with a basic multiplication algorithm, it...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.