Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

Put t on the left side? Vc = V * (1- e^(-t / R*C))

Status
Not open for further replies.
Bill,
I don't understand why you have exp(1)* rather than ln

And it is RC ln{1/(1 - Vc/V)}
 
Last edited:
blueroomelectronics said:
The "Just BASIC" compiler does not have an ln() statement.
exp(1) [2.71828183] seems to work fine, I'll remove the brackets.

Bill,
Some Basics consider the 'log' statement as meaning natural logs to base 'e'

Try 'print log(2.71828183)' you most likely get '1', this will confirm that your Basic considers 'log' as a natural log reference.== 'ln'
 
Last edited:
ericgibbs said:
Bill,
Some Basics consider the 'log' statement as meaning natural logs to base 'e'
Eric, you're right. The manual of that compiler says:
LOG(n) Description:
This function returns the natural logarithm of n.

Usage:
print log( 7 ) produces: 1.9459101
BTW, it would be easy to get natural logarithm of x if you could use only base-10 logarithms:
ln (x) = 2.302585 * log10 (x)
 
I never saw the point of the exp function, surly it's easier to do 2.71828183^x.
 
Not really.

x ^ y where y is non-integer is calculated as base ^ (y * log-base x).

If base is 10, then x ^ y is 10 ^ (y log10 x). We used to do this with paper, pencil, and a table of logarithms.

If base is e, then x ^ y is e ^ (y log-e x), or exp(y * ln(x)). There are approximating polynomials for doing this on a computer.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top