Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Program Announcements / logarithm Plugin. Allows you to do log, log2, and log10!

Author
Message
coolgames
19
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 31st May 2006 01:03 Edited at: 31st May 2006 01:19
There was somone that posted about doing logarithms in dbpro. I threw together a plugin that allows you to do log,log2,and log10. I couldn't figure out logn. I'm just using the math.h library to do the math. If sombody could point me in the right direction for logn, that would be helpful.

Anyway, the dll is attached. Just put it in the plugins directory.

The commands are log,log2,and log10. I will make a keywords file later.

Enjoy!

p.s. This is my first dll, yay!

Edit: updated with help files and keywords. To install take the files in the zip and drag them into the folder where you installed dbpro.

Attachments

Login to view attachments
coolgames
19
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 31st May 2006 01:21
Update, added helpfiles and keywords. The links to the help file pages will be found in the core section of the help docs.

Valle
18
Years of Service
User Offline
Joined: 10th Mar 2006
Location: in your girlfriends bed
Posted: 31st May 2006 01:28
sounds cool , btw wats the difference between log and log10?

coolgames
19
Years of Service
User Offline
Joined: 26th Sep 2005
Location: Oregon, USA
Posted: 31st May 2006 01:46
I don't know anything about logarithems, I just knew some people were wanting it. I just used the math c++ library to do the math.

TEH_CODERER
21
Years of Service
User Offline
Joined: 12th Nov 2003
Location: Right behind you!
Posted: 31st May 2006 13:39
@Valle - As far as I know, and I do A-level maths, they are the same. By the way, off topic, I just noticed your sig and Wow! That was a great game!

@Coolgames - Could be useful. Not sure what for yet...

[url]andrewneale2004@yahoo.com[/url]
http://www.elbsoftware.dbspot.com
Xolatron
18
Years of Service
User Offline
Joined: 12th Mar 2006
Location: The Star Forge Language: DBpro
Posted: 1st Jun 2006 18:15
To do logn, it really is simple. So simple, in fact, that you don't even need the log2 or log10:

logn(x) = log(x)/log(n)

Simple... but keeping the log10 and log2 are a good idea, though.

To add the logn, just make it something like logn(base,x)
and in the dll use log(x)/log(n)

Never realized... DBp doesn't have logs. Cool.

-Xol
Xolatron
18
Years of Service
User Offline
Joined: 12th Mar 2006
Location: The Star Forge Language: DBpro
Posted: 1st Jun 2006 18:17 Edited at: 5th Jun 2006 22:16
Oh... and the difference between log and log 10 is that log probably does the natural logarithm, or ln (base e). Coolgames, you might want to rename log to ln and log10 to log.

(Sorry for the double post... but since I created a new account I can't edit my posts yet).

-Xol

Login to post a reply

Server time is: 2024-11-21 16:39:18
Your offset time is: 2024-11-21 16:39:18