troubleshooting Question

How do you use the LN function that is found on a Business Calculator in Visual Basic?

Avatar of BIGELOJ
BIGELOJFlag for Canada asked on
Visual Basic ClassicAlgorithms
8 Comments2 Solutions423 ViewsLast Modified:
I need to know how call a function in Visual Basic that does the same thing as the LN button on a business calculator. I found the following on this site:

    Private Function Ln(ByVal Number As Double) As Double

        Ln = Log(Number) / Log(Exp(1))

    End Function

I get errors stating that the Log and Exp portions have not been declared. I thought that these were built-in function of VB?

My other part of my code calls this function as follows:

   'Now Call the function that performs the LN portion on a calculator
        Dim dblLN1, dblLN2 As Double

        dblLN1 = Ln(dblNumerator)
        dblLN2 = Ln(dblDenominator)

I am using Visual Studio 2008. Any help would be GREATLY appreciated.

Our community of experts have been thoroughly vetted for their expertise and industry experience.

Join our community to see this answer!
Unlock 2 Answers and 8 Comments.
Start Free Trial
Learn from the best

Network and collaborate with thousands of CTOs, CISOs, and IT Pros rooting for you and your success.

Andrew Hancock - VMware vExpert
See if this solution works for you by signing up for a 7 day free trial.
Unlock 2 Answers and 8 Comments.
Try for 7 days

”The time we save is the biggest benefit of E-E to our team. What could take multiple guys 2 hours or more each to find is accessed in around 15 minutes on Experts Exchange.

-Mike Kapnisakis, Warner Bros